mudlet-makers team mailing list archive
-
mudlet-makers team
-
Mailing list archive
-
Message #04358
[Bug 1670576] Re: Allow setAppStyleSheet to overwrite Mudlet-specified colours
Is that everywhere with text or just some places? If it is the latter I
would suspect that we are using pallet effects for them (which I feel
sure I saw being manipulated in some of the dialogues at least) - the Qt
Documentation is quite specific about NOT mixing palette and style-
sheets, e.g. the current version (5.8) has this to say about the
(QPalette)QWidget::pallete member and it's setter,
(void)QWidget::setPalette(const QPalette &) method:
'When you assign a new palette to a widget, the color roles from this
palette are combined with the widget's default palette to form the
widget's final palette. The palette entry for the widget's background
role is used to fill the widget's background (see
QWidget::autoFillBackground), and the foreground role initializes
QPainter's pen.
'The default depends on the system environment. QApplication maintains a
system/theme palette which serves as a default for all widgets. There
may also be special palette defaults for certain types of widgets (e.g.,
on Windows XP and Vista, all classes that derive from QMenuBar have a
special default palette). You can also define default palettes for
widgets yourself by passing a custom palette and the name of a widget to
QApplication::setPalette(). Finally, the style always has the option of
polishing the palette as it's assigned (see QStyle::polish()).
'QWidget propagates explicit palette roles from parent to child. If you
assign a brush or color to a specific role on a palette and assign that
palette to a widget, that role will propagate to all the widget's
children, overriding any system defaults for that role. Note that
palettes by default don't propagate to windows (see isWindow()) unless
the Qt::WA_WindowPropagation attribute is enabled.
'QWidget's palette propagation is similar to its font propagation.
'The current style, which is used to render the content of all standard
Qt widgets, is free to choose colors and brushes from the widget
palette, or in some cases, to ignore the palette (partially, or
completely). In particular, certain styles like GTK style, Mac style,
Windows XP, and Vista style, depend on third party APIs to render the
content of widgets, and these styles typically do not follow the
palette. Because of this, assigning roles to a widget's palette is not
guaranteed to change the appearance of the widget. Instead, you may
choose to apply a styleSheet. You can refer to our Knowledge Base
article here for more information.
'Warning: Do not use this function in conjunction with Qt Style Sheets.
When using style sheets, the palette of a widget can be customized using
the "color", "background-color", "selection-color", "selection-
background-color" and "alternate-background-color".'
--
You received this bug notification because you are a member of Mudlet
Makers, which is subscribed to Mudlet.
https://bugs.launchpad.net/bugs/1670576
Title:
Allow setAppStyleSheet to overwrite Mudlet-specified colours
Status in Mudlet:
Confirmed
Bug description:
Whatever we're doing to set the colour of text isn't working with
setAppStyleSheet, or someone just needs to figure out the right CSS
style for the dialog we show (since you don't want to change the text
of the colour everywhere). See https://imgur.com/a/LSWGP for examples
and http://forums.mudlet.org/download/file.php?id=1418 for the dark
theme.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mudlet/+bug/1670576/+subscriptions
Follow ups
References