mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-28 15:27:18 -05:00
🐛 Fix for the issue #108: Add a scrollbar in the AddEntry window when on "small" screen
This commit is contained in:
parent
c7b4b8d3c3
commit
9477437256
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
#include "EditWidget.h"
|
#include "EditWidget.h"
|
||||||
#include "ui_EditWidget.h"
|
#include "ui_EditWidget.h"
|
||||||
|
#include <QScrollArea>
|
||||||
|
|
||||||
#include "core/FilePath.h"
|
#include "core/FilePath.h"
|
||||||
|
|
||||||
@ -47,7 +48,17 @@ EditWidget::~EditWidget()
|
|||||||
|
|
||||||
void EditWidget::addPage(const QString& labelText, const QIcon& icon, QWidget* widget)
|
void EditWidget::addPage(const QString& labelText, const QIcon& icon, QWidget* widget)
|
||||||
{
|
{
|
||||||
m_ui->stackedWidget->addWidget(widget);
|
/*
|
||||||
|
* Instead of just adding a widget we're going to wrap it into a scroll area. It will automatically show
|
||||||
|
* scrollbars when the widget cannot fit into the page. This approach prevents the main window of the application
|
||||||
|
* from automatic resizing and it now should be able to fit into a user's monitor even if the monitor is only 768
|
||||||
|
* pixels high.
|
||||||
|
*/
|
||||||
|
QScrollArea* scrollArea = new QScrollArea(m_ui->stackedWidget);
|
||||||
|
scrollArea->setFrameShape(QFrame::NoFrame);
|
||||||
|
scrollArea->setWidget(widget);
|
||||||
|
scrollArea->setWidgetResizable(true);
|
||||||
|
m_ui->stackedWidget->addWidget(scrollArea);
|
||||||
m_ui->categoryList->addCategory(labelText, icon);
|
m_ui->categoryList->addCategory(labelText, icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user