Keep focus on the panel list when changing settings / tools panels.
Fixed Windows combo box flickering when changing panels.
Suppress Alt+F4 on Windows in fullscreen mode.
This commit is contained in:
byuu
2019-09-06 23:19:44 +09:00
parent a6ebce428f
commit 56c9a5195e
9 changed files with 11 additions and 7 deletions

View File

@@ -45,12 +45,10 @@ auto pComboButton::reset() -> void {
}
auto pComboButton::setGeometry(Geometry geometry) -> void {
//height = minimum drop-down list height; use CB_SETITEMHEIGHT to control actual widget height
pWidget::setGeometry({geometry.x(), geometry.y(), geometry.width(), 1});
RECT rc;
GetWindowRect(hwnd, &rc);
unsigned adjustedHeight = geometry.height() - ((rc.bottom - rc.top) - SendMessage(hwnd, CB_GETITEMHEIGHT, (WPARAM)-1, 0));
SendMessage(hwnd, CB_SETITEMHEIGHT, (WPARAM)-1, adjustedHeight);
geometry.setY(geometry.y() + (geometry.height() - (rc.bottom - rc.top)));
pWidget::setGeometry({geometry.x(), geometry.y(), geometry.width(), 1});
}
auto pComboButton::onChange() -> void {