Skip to content

Commit

Permalink
fix: hide the non-window type window titlebar menu button on initialize
Browse files Browse the repository at this point in the history
  • Loading branch information
zccrs committed May 20, 2019
1 parent a509a5e commit eb0500f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/widgets/dtitlebar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,12 @@ DTitlebar::DTitlebar(QWidget *parent) :

D_D(DTitlebar);
d->init();

// 默认只在普通窗口中显示窗口菜单按钮
if (parent && parent->window()->windowType() != Qt::Window) {
d->optionButton->hide();
}

d->buttonArea->adjustSize();
d->buttonArea->resize(d->buttonArea->size());
d->titlePadding->setFixedSize(d->buttonArea->size());
Expand Down

0 comments on commit eb0500f

Please sign in to comment.