Pass title controls style in constructor.
This commit is contained in:
parent
4c04017737
commit
921686055c
2 changed files with 4 additions and 2 deletions
|
|
@ -21,8 +21,9 @@ namespace Platform {
|
|||
|
||||
TitleControls::TitleControls(
|
||||
not_null<RpWidget*> parent,
|
||||
const style::WindowTitle &st,
|
||||
Fn<void(bool maximized)> maximize)
|
||||
: _st(&st::defaultWindowTitle)
|
||||
: _st(&st)
|
||||
, _minimize(parent, _st->minimize)
|
||||
, _maximizeRestore(parent, _st->maximize)
|
||||
, _close(parent, _st->close)
|
||||
|
|
@ -184,7 +185,7 @@ void TitleControls::updateButtonsState() {
|
|||
|
||||
TitleWidget::TitleWidget(not_null<RpWidget*> parent)
|
||||
: RpWidget(parent)
|
||||
, _controls(this)
|
||||
, _controls(this, st::defaultWindowTitle)
|
||||
, _shadow(this, st::titleShadow) {
|
||||
setAttribute(Qt::WA_OpaquePaintEvent);
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ class TitleControls final {
|
|||
public:
|
||||
TitleControls(
|
||||
not_null<RpWidget*> parent,
|
||||
const style::WindowTitle &st,
|
||||
Fn<void(bool maximized)> maximize = nullptr);
|
||||
|
||||
void setStyle(const style::WindowTitle &st);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue