mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-28 00:39:43 -05:00
Enable high-DPI scaling to support 4k screens.
This enables coordinate system scaling for high-DPI displays, which enforces correct proportions even on small 4k displays. The icons are scaled up without interpolation, which makes them crisp, but a bit pixelated. A new scalable icon set will solve this problem, but is not scope of this patch. Resolves #548, #1381, #1710, #1888 In addition, this patch enforces the KeePassXC icon theme for the KMessageBox close icon, since using the system theme produces very ugly icons on some Linux systems.
This commit is contained in:
parent
a44138dd5c
commit
b45f0e3e46
@ -94,7 +94,7 @@ void KMessageWidgetPrivate::init(KMessageWidget *q_ptr)
|
||||
QAction *closeAction = new QAction(q);
|
||||
closeAction->setText(KMessageWidget::tr("&Close"));
|
||||
closeAction->setToolTip(KMessageWidget::tr("Close message"));
|
||||
closeAction->setIcon(FilePath::instance()->icon("actions", "message-close"));
|
||||
closeAction->setIcon(FilePath::instance()->icon("actions", "message-close", false));
|
||||
|
||||
QObject::connect(closeAction, SIGNAL(triggered(bool)), q, SLOT(animatedHide()));
|
||||
|
||||
|
@ -46,6 +46,10 @@ Q_IMPORT_PLUGIN(QXcbIntegrationPlugin)
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
|
||||
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
#endif
|
||||
|
||||
Application app(argc, argv);
|
||||
Application::setApplicationName("keepassxc");
|
||||
Application::setApplicationVersion(KEEPASSXC_VERSION);
|
||||
|
Loading…
Reference in New Issue
Block a user