File tree 3 files changed +12
-8
lines changed 3 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -286,19 +286,14 @@ void LXQtFancyMenu::setMenuFontSize()
286
286
287
287
QFont menuFont = mButton .font ();
288
288
bool customFont = settings ()->value (QStringLiteral (" customFont" ), false ).toBool ();
289
+ int customFontSize = settings ()->value (QStringLiteral (" customFontSize" )).toInt ();
289
290
290
291
if (customFont)
291
292
{
292
293
menuFont = mWindow ->font ();
293
- menuFont.setPointSize (settings ()->value (QStringLiteral (" customFontSize" )).toInt ());
294
+ menuFont.setPointSize (customFontSize);
295
+ mWindow ->setCustomFont (menuFont);
294
296
}
295
-
296
- if (mWindow ->font () != menuFont)
297
- {
298
- mWindow ->setFont (menuFont);
299
- }
300
-
301
- // FIXME: font is not really changing, what about icon sizes?
302
297
}
303
298
304
299
/* ***********************************************
Original file line number Diff line number Diff line change @@ -500,6 +500,13 @@ void LXQtFancyMenuWindow::setSearchEditFocus()
500
500
mSearchEdit ->setFocus ();
501
501
}
502
502
503
+ void LXQtFancyMenuWindow::setCustomFont (const QFont &f)
504
+ {
505
+ mAppView ->setFont (f);
506
+ mCategoryView ->setFont (f);
507
+ mSearchEdit ->setFont (f);
508
+ }
509
+
503
510
QStringList LXQtFancyMenuWindow::favorites () const
504
511
{
505
512
return mFavorites ;
Original file line number Diff line number Diff line change @@ -75,6 +75,8 @@ class LXQtFancyMenuWindow : public QWidget
75
75
76
76
void setSearchEditFocus ();
77
77
78
+ void setCustomFont (const QFont& f);
79
+
78
80
signals:
79
81
void aboutToShow ();
80
82
void aboutToHide ();
You can’t perform that action at this time.
0 commit comments