From dc3e2238754edaf5438730f9babfc621f7ed6f6b Mon Sep 17 00:00:00 2001 From: Vladimir Svyatski Date: Tue, 18 Apr 2017 16:04:32 +0300 Subject: [PATCH 1/2] Moved the "Clear history" menu item caption from MainWindow (Database > Recent Databases > Clear history) to the string resources. As a result it is no longer hardcoded and can be translated. --- share/translations/keepassx_en.ts | 4 ++++ share/translations/keepassx_ru.ts | 6 +++++- src/gui/MainWindow.cpp | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/share/translations/keepassx_en.ts b/share/translations/keepassx_en.ts index d10bff0de..0638beb97 100644 --- a/share/translations/keepassx_en.ts +++ b/share/translations/keepassx_en.ts @@ -1287,6 +1287,10 @@ This is a one-way migration. You won't be able to open the imported databas Password Generator + + Clear history + + OptionDialog diff --git a/share/translations/keepassx_ru.ts b/share/translations/keepassx_ru.ts index faca7e2f0..94078a1d6 100644 --- a/share/translations/keepassx_ru.ts +++ b/share/translations/keepassx_ru.ts @@ -1291,6 +1291,10 @@ This is a one-way migration. You won't be able to open the imported databas Password Generator Генератор паролей + + Clear history + Очистить историю + OptionDialog @@ -1789,4 +1793,4 @@ give it a unique name to identify and accept it. имена файлов открываемого хранилища паролей (*.kdbx) - \ No newline at end of file + diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index 49f6960cb..f3daf455e 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -130,7 +130,7 @@ MainWindow::MainWindow() m_ui->toolBar->setVisible(showToolbar); connect(m_ui->toolBar, SIGNAL(visibilityChanged(bool)), this, SLOT(saveToolbarState(bool))); - m_clearHistoryAction = new QAction("Clear history", m_ui->menuFile); + m_clearHistoryAction = new QAction(tr("Clear history"), m_ui->menuFile); m_lastDatabasesActions = new QActionGroup(m_ui->menuRecentDatabases); connect(m_clearHistoryAction, SIGNAL(triggered()), this, SLOT(clearLastDatabases())); connect(m_lastDatabasesActions, SIGNAL(triggered(QAction*)), this, SLOT(openRecentDatabase(QAction*))); From 9477437256c8b34d0bf124c07abf7e08690dd824 Mon Sep 17 00:00:00 2001 From: Vladimir Svyatski Date: Thu, 20 Apr 2017 16:56:54 +0300 Subject: [PATCH 2/2] :bug: Fix for the issue #108: Add a scrollbar in the AddEntry window when on "small" screen --- src/gui/EditWidget.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/gui/EditWidget.cpp b/src/gui/EditWidget.cpp index 24cc64fec..a0144c8cb 100644 --- a/src/gui/EditWidget.cpp +++ b/src/gui/EditWidget.cpp @@ -17,6 +17,7 @@ #include "EditWidget.h" #include "ui_EditWidget.h" +#include #include "core/FilePath.h" @@ -47,7 +48,17 @@ EditWidget::~EditWidget() 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); }