Fix maximum size for pretty OSD when changing fonts
This commit is contained in:
parent
7de618beff
commit
86c3ec269f
|
@ -117,6 +117,14 @@ OSDPretty::OSDPretty(Mode mode, QWidget *parent)
|
||||||
int margin = l->margin() + kDropShadowSize;
|
int margin = l->margin() + kDropShadowSize;
|
||||||
l->setMargin(margin);
|
l->setMargin(margin);
|
||||||
|
|
||||||
|
// Get current screen resolution
|
||||||
|
QRect screenResolution = QApplication::desktop()->screenGeometry();
|
||||||
|
// Leave 200 px for icon
|
||||||
|
ui_->summary->setMaximumWidth(screenResolution.width()-200);
|
||||||
|
ui_->message->setMaximumWidth(screenResolution.width()-200);
|
||||||
|
// Set maximum size for the OSD, a little margin here too
|
||||||
|
setMaximumSize(screenResolution.width()-100,screenResolution.height()-100);
|
||||||
|
|
||||||
// Don't load settings here, they will be reloaded anyway on creation
|
// Don't load settings here, they will be reloaded anyway on creation
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue