mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-24 23:31:36 +08:00
UI: Disable wheel scrolling on QComboBoxes
Adds a new ProxyStyle, OBSIgnoreWheelProxyStyle, and applies it to the entire program. This style sets a StyleHint to disable mouse wheel scrolling on QComboBoxes. The existing OBSProxyStyle, which is used only for the context bar, has been renamed accordingly.
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
|
||||
#include "qt-wrappers.hpp"
|
||||
#include "obs-app.hpp"
|
||||
#include "obs-proxy-style.hpp"
|
||||
#include "log-viewer.hpp"
|
||||
#include "slider-ignorewheel.hpp"
|
||||
#include "window-basic-main.hpp"
|
||||
@@ -1116,6 +1117,7 @@ bool OBSApp::SetTheme(std::string name, std::string path)
|
||||
QString mpath = QString("file:///") + path.c_str();
|
||||
setPalette(defaultPalette);
|
||||
ParseExtraThemeData(path.c_str());
|
||||
setStyle(new OBSIgnoreWheelProxyStyle);
|
||||
setStyleSheet(mpath);
|
||||
QColor color = palette().text().color();
|
||||
themeDarkMode = !(color.redF() < 0.5);
|
||||
|
||||
Reference in New Issue
Block a user