forked from openkylin/kylin-photo-viewer
fix(bug修复): 修复issue和自测问题
This commit is contained in:
parent
1061332039
commit
5b82bfd6e9
|
@ -1,3 +1,12 @@
|
|||
kylin-photo-viewer (1.3.0.3-ok13) yangtze; urgency=medium
|
||||
|
||||
* BUG号:# issues/I64UVQ【看图】当看图窗口上方存在其他窗口时,点击看图窗口标题栏的菜单按钮,菜单栏显示位置异常且存在多余的标题栏
|
||||
* 需求号:无
|
||||
* 其他改动说明:修复最大化不生效问题
|
||||
* 影响域:仅bug修复,无其他影响
|
||||
|
||||
-- zoujunnan <zoujunnan@kylinos.cn> Tue, 03 Jan 2023 18:43:28 +0800
|
||||
|
||||
kylin-photo-viewer (1.3.0.3-ok12) yangtze; urgency=medium
|
||||
|
||||
* BUG号:# issues/I64UVQ【看图】当看图窗口上方存在其他窗口时,点击看图窗口标题栏的菜单按钮,菜单栏显示位置异常且存在多余的标题栏
|
||||
|
|
|
@ -11,7 +11,7 @@ CONFIG += link_pkgconfig
|
|||
VERSION = 1.3.0.3
|
||||
DEFINES += APP_VERSION=\\\"$$VERSION\\\"
|
||||
##定义一个字符串,可以将版本号数字之后的部分添加进去
|
||||
DEFINES += APP_VERSION_DETAIL=\\\"$$VERSION-ok12\\\"
|
||||
DEFINES += APP_VERSION_DETAIL=\\\"$$VERSION-ok13\\\"
|
||||
|
||||
QMAKE_CXXFLAGS += -g
|
||||
|
||||
|
|
|
@ -924,10 +924,12 @@ void KyView::fullScreen()
|
|||
{
|
||||
if (this->isFullScreen()) {
|
||||
KWindowSystem::clearState(winId(), NET::FullScreen);
|
||||
m_nowFullScreen = false;
|
||||
// m_titlebar->g_fullscreen->setIcon(QIcon::fromTheme("window-maximize-symbolic"));//主题库的全屏图标
|
||||
// m_titlebar->g_fullscreen->setToolTip(tr("full srceen"));
|
||||
} else {
|
||||
KWindowSystem::setState(winId(), NET::FullScreen);
|
||||
m_nowFullScreen = true;
|
||||
m_titlebar->g_fullscreen->setIcon(QIcon::fromTheme("window-restore-symbolic")); //主题库的恢复图标
|
||||
m_titlebar->g_fullscreen->setToolTip(tr("recovery"));
|
||||
}
|
||||
|
@ -992,14 +994,13 @@ void KyView::markToolChange()
|
|||
//最大化和还原
|
||||
void KyView::changOrigSize()
|
||||
{
|
||||
if (windowState() == Qt::WindowMaximized) {
|
||||
if (this->isMaximized()) {
|
||||
this->showNormal();
|
||||
} else if (windowState() == Qt::WindowNoState) {
|
||||
} else if (this->isFullScreen() || m_nowFullScreen) {
|
||||
KWindowSystem::clearState(winId(), NET::FullScreen);
|
||||
m_nowFullScreen = false;
|
||||
} else {
|
||||
this->showMaximized();
|
||||
} else if (windowState() == Qt::WindowFullScreen) {
|
||||
KWindowSystem::clearState(winId(), NET::FullScreen);
|
||||
} else if (windowState() == Qt::WindowMaximized | Qt::WindowFullScreen) {
|
||||
KWindowSystem::clearState(winId(), NET::FullScreen);
|
||||
}
|
||||
m_titlebar->dealEditState();
|
||||
}
|
||||
|
@ -1150,7 +1151,7 @@ void KyView::resizeEvent(QResizeEvent *event)
|
|||
albumChange();
|
||||
markChange();
|
||||
brushSettingsChange();
|
||||
if (this->isMaximized() || this->isFullScreen()) {
|
||||
if (this->isMaximized() || this->isFullScreen() || m_nowFullScreen) {
|
||||
m_titlebar->g_fullscreen->setIcon(QIcon::fromTheme("window-restore-symbolic")); //主题库的全屏图标
|
||||
m_titlebar->g_fullscreen->setToolTip(tr("recovery"));
|
||||
} else {
|
||||
|
@ -1754,11 +1755,22 @@ void KyView::changeEvent(QEvent *event)
|
|||
this->move((screen->geometry().width() - this->width()) / 2,
|
||||
(screen->geometry().height() - this->height()) / 2);
|
||||
}
|
||||
} else if (state == Qt::WindowMaximized) {
|
||||
} else {
|
||||
m_titlebar->g_fullscreen->setIcon(QIcon::fromTheme("window-restore-symbolic")); //主题库的恢复图标
|
||||
m_titlebar->g_fullscreen->setToolTip(tr("recovery"));
|
||||
}
|
||||
}
|
||||
|
||||
if (m_nowFullScreen) {
|
||||
m_titlebar->g_fullscreen->setIcon(QIcon::fromTheme("window-restore-symbolic")); //主题库的恢复图标
|
||||
m_titlebar->g_fullscreen->setToolTip(tr("recovery"));
|
||||
} else {
|
||||
if (this->isMaximized()) {
|
||||
m_titlebar->g_fullscreen->setIcon(QIcon::fromTheme("window-restore-symbolic")); //主题库的恢复图标
|
||||
m_titlebar->g_fullscreen->setToolTip(tr("recovery"));
|
||||
} else {
|
||||
m_titlebar->g_fullscreen->setIcon(QIcon::fromTheme("window-maximize-symbolic")); //主题库的全屏图标
|
||||
m_titlebar->g_fullscreen->setToolTip(tr("full srceen"));
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -184,7 +184,7 @@ private:
|
|||
bool m_recordSidebarStateBeforeOtherOperate = false; //侧栏
|
||||
bool m_recordInfoStateBeforeOtherOperate = false; //信息栏
|
||||
void restoreAllBallState();
|
||||
|
||||
bool m_nowFullScreen = false;
|
||||
|
||||
private Q_SLOTS:
|
||||
|
||||
|
|
Loading…
Reference in New Issue