Dim disabled items in context menus (#4423)
This commit is contained in:
@@ -292,6 +292,11 @@ bool BaseWindow::supportsCustomWindowFrame()
|
||||
|
||||
void BaseWindow::themeChangedEvent()
|
||||
{
|
||||
if (!this->flags_.has(BaseWindow::DisableStyleSheet))
|
||||
{
|
||||
this->setStyleSheet(this->theme->window.contextMenuStyleSheet);
|
||||
}
|
||||
|
||||
if (this->hasCustomWindowFrame())
|
||||
{
|
||||
QPalette palette;
|
||||
|
||||
@@ -24,16 +24,17 @@ class BaseWindow : public BaseWidget
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum Flags {
|
||||
enum Flags : uint32_t {
|
||||
None = 0,
|
||||
EnableCustomFrame = 1,
|
||||
Frameless = 2,
|
||||
TopMost = 4,
|
||||
DisableCustomScaling = 8,
|
||||
FramelessDraggable = 16,
|
||||
DontFocus = 32,
|
||||
Dialog = 64,
|
||||
DisableLayoutSave = 128,
|
||||
Frameless = (1 << 1),
|
||||
TopMost = (1 << 2),
|
||||
DisableCustomScaling = (1 << 3),
|
||||
FramelessDraggable = (1 << 4),
|
||||
DontFocus = (1 << 5),
|
||||
Dialog = (1 << 6),
|
||||
DisableLayoutSave = (1 << 7),
|
||||
DisableStyleSheet = (1 << 8),
|
||||
};
|
||||
|
||||
enum ActionOnFocusLoss { Nothing, Delete, Close, Hide };
|
||||
|
||||
@@ -29,9 +29,10 @@
|
||||
namespace chatterino {
|
||||
|
||||
SettingsDialog::SettingsDialog(QWidget *parent)
|
||||
: BaseWindow({BaseWindow::Flags::DisableCustomScaling,
|
||||
BaseWindow::Flags::Dialog, BaseWindow::DisableLayoutSave},
|
||||
parent)
|
||||
: BaseWindow(
|
||||
{BaseWindow::Flags::DisableCustomScaling, BaseWindow::Flags::Dialog,
|
||||
BaseWindow::DisableLayoutSave, BaseWindow::DisableStyleSheet},
|
||||
parent)
|
||||
{
|
||||
this->setObjectName("SettingsDialog");
|
||||
this->setWindowTitle("Chatterino Settings");
|
||||
|
||||
Reference in New Issue
Block a user