mirror of https://github.com/KLayout/klayout.git
Merge remote-tracking branch 'origin/master' into master-mac-qt6
This commit is contained in:
commit
1c361ff17f
|
|
@ -112,7 +112,7 @@ equals(HAVE_RUBY, "1") {
|
||||||
|
|
||||||
plugins.depends += lay
|
plugins.depends += lay
|
||||||
|
|
||||||
klayout_main.depends += plugins $$MAIN_DEPENDS
|
klayout_main.depends += doc icons plugins $$MAIN_DEPENDS
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -302,6 +302,7 @@ klayout_main_cont (int &argc, char **argv)
|
||||||
if (non_ui_mode) {
|
if (non_ui_mode) {
|
||||||
app.reset (new lay::NonGuiApplication (argc, argv));
|
app.reset (new lay::NonGuiApplication (argc, argv));
|
||||||
} else {
|
} else {
|
||||||
|
lay::GuiApplication::initialize ();
|
||||||
app.reset (new lay::GuiApplication (argc, argv));
|
app.reset (new lay::GuiApplication (argc, argv));
|
||||||
lay::enable_signal_handler_gui (true);
|
lay::enable_signal_handler_gui (true);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1434,12 +1434,6 @@ GuiApplication::GuiApplication (int &argc, char **argv)
|
||||||
setStyle (new lay::BackgroundAwareTreeStyle (0));
|
setStyle (new lay::BackgroundAwareTreeStyle (0));
|
||||||
|
|
||||||
setWindowIcon (QIcon (QString::fromUtf8 (":/logo.png")));
|
setWindowIcon (QIcon (QString::fromUtf8 (":/logo.png")));
|
||||||
#if QT_VERSION >= 0x040500
|
|
||||||
setAttribute (Qt::AA_DontShowIconsInMenus, false);
|
|
||||||
#endif
|
|
||||||
#if QT_VERSION >= 0x050000
|
|
||||||
setAttribute (Qt::AA_UseHighDpiPixmaps, true);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GuiApplication::~GuiApplication ()
|
GuiApplication::~GuiApplication ()
|
||||||
|
|
@ -1453,6 +1447,20 @@ GuiApplication::~GuiApplication ()
|
||||||
shutdown ();
|
shutdown ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
GuiApplication::initialize ()
|
||||||
|
{
|
||||||
|
#if QT_VERSION >= 0x040500
|
||||||
|
QCoreApplication::setAttribute (Qt::AA_DontShowIconsInMenus, false);
|
||||||
|
#endif
|
||||||
|
#if QT_VERSION >= 0x050000
|
||||||
|
QCoreApplication::setAttribute (Qt::AA_UseHighDpiPixmaps, true);
|
||||||
|
#endif
|
||||||
|
#if QT_VERSION >= 0x050600
|
||||||
|
QCoreApplication::setAttribute (Qt::AA_EnableHighDpiScaling, true);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
GuiApplication::notify (QObject *receiver, QEvent *e)
|
GuiApplication::notify (QObject *receiver, QEvent *e)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -390,6 +390,13 @@ public:
|
||||||
|
|
||||||
QApplication *qapp_gui () { return this; }
|
QApplication *qapp_gui () { return this; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Does some pre-initialization
|
||||||
|
*
|
||||||
|
* Must be called before the GuiApplication object is created
|
||||||
|
*/
|
||||||
|
static void initialize ();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Reimplementation of notify from QApplication
|
* @brief Reimplementation of notify from QApplication
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue