mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
allowing hotswapping the top-most setting on windows
This commit is contained in:
parent
67e580059c
commit
eb25e863e3
2 changed files with 11 additions and 0 deletions
|
@ -115,9 +115,16 @@ void BaseWindow::init()
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef USEWINSDK
|
||||
app->settings->windowTopMost.connect([this](bool topMost, auto) {
|
||||
::SetWindowPos((HWND)this->winId(), topMost ? HWND_TOPMOST : HWND_NOTOPMOST, 0, 0, 0, 0,
|
||||
SWP_NOMOVE | SWP_NOSIZE);
|
||||
});
|
||||
#else
|
||||
if (app->settings->windowTopMost.getValue()) {
|
||||
this->setWindowFlags(this->windowFlags() | Qt::WindowStaysOnTopHint);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void BaseWindow::setStayInScreenRect(bool value)
|
||||
|
|
|
@ -8,7 +8,11 @@
|
|||
#include <QLabel>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#ifdef USEWINSDK
|
||||
#define WINDOW_TOPMOST "Window always on top"
|
||||
#else
|
||||
#define WINDOW_TOPMOST "Window always on top (requires restart)"
|
||||
#endif
|
||||
#define INPUT_EMPTY "Hide input box when empty"
|
||||
#define PAUSE_HOVERING "When hovering"
|
||||
|
||||
|
|
Loading…
Reference in a new issue