I mean other people's stylesheets will be able to override what Mudlet's stylesheets set.
On Wed, 8 Mar 2017 5:15 pm Vadim Peretokin, <[email protected]> wrote: > Sounds like we should convert our palette use to stylesheets, then > stylesheets would be able to override what we set. > > A feature to look into if anyone actually gets interested in theming > Mudlet. > > On Wed, Mar 8, 2017 at 5:11 PM Stephen Lyons <[email protected]> > wrote: > > 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 > > _______________________________________________ > Mailing list: https://launchpad.net/~mudlet-makers > Post to : [email protected] > Unsubscribe : https://launchpad.net/~mudlet-makers > More help : https://help.launchpad.net/ListHelp > >
_______________________________________________ Mailing list: https://launchpad.net/~mudlet-makers Post to : [email protected] Unsubscribe : https://launchpad.net/~mudlet-makers More help : https://help.launchpad.net/ListHelp

