Skip to content

Commit

Permalink
优化多显示器菜单
Browse files Browse the repository at this point in the history
  • Loading branch information
iwxyi committed Jan 11, 2023
1 parent 787b0fb commit 30850e7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions third_party/facile_menu/facilemenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ FacileMenu::FacileMenu(QWidget *parent) : QWidget(parent)
setAttribute(Qt::WA_DeleteOnClose, true);
setFocusPolicy(Qt::StrongFocus); // 获取焦点,允许按键点击
setWindowFlag(Qt::Popup, true);
// setWindowFlag(Qt::NoDropShadowWindowHint, true);
setAutoFillBackground(false); //这个不设置的话就背景变黑
setAttribute(Qt::WA_StyledBackground);

Expand All @@ -30,7 +29,7 @@ FacileMenu::FacileMenu(QWidget *parent) : QWidget(parent)
setMouseTracking(true);

// 获取窗口尺寸
window_rect = QApplication::desktop()->availableGeometry();
window_rect = QApplication::screenAt(QCursor::pos())->geometry();
window_height = window_rect.height();
}

Expand Down

0 comments on commit 30850e7

Please sign in to comment.