Skip to content

Commit

Permalink
fix: Adapt comapct mode with click image.
Browse files Browse the repository at this point in the history
点击图片打开时,show() 重置了窗口状态,重新设置标题栏模式。

Log: Adapt comapct mode with click image.
Influence: CompactMode
  • Loading branch information
rb-union authored and starhcq committed May 30, 2023
1 parent 9504957 commit 9e6f819
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/album/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,15 @@ int main(int argc, char *argv[])
};
Eventlogutils::GetInstance()->writeLogs(objStartEvent);
MainWindow w;
bool titleVisible = w.titlebar()->isVisible();
dApp->setMainWindow(&w);
w.show();
dAppNew->setMainWindow(&w);
Dtk::Widget::moveToCenter(&w);

// show()会重置标题栏显示状态
w.titlebar()->setVisible(titleVisible);

//#if (DTK_VERSION >= DTK_VERSION_CHECK(5, 5, 0, 0))
// dAppNew->ignoreVirtualKeyboard(&w); //禁止虚拟键盘顶起主界面标题栏(DTK5.5有效)
//#endif
Expand Down

0 comments on commit 9e6f819

Please sign in to comment.