setAppStyleSheet

Nyyrazzilyss
Posts: 334
Joined: Thu Mar 05, 2015 2:53 am

setAppStyleSheet

Post by Nyyrazzilyss »

I played around a bit with this. I did have to add two lines almost immediately to the sample usage on the wiki:

QToolButton:hover { background-color: grey;}
QToolButton:focus { background-color: grey;}

That makes the mudlet buttons go grey in colour when moving through them. (The pre-existing sample doesn't have anything happen)

User avatar
Vadi
Posts: 5048
Joined: Sat Mar 14, 2009 3:13 pm

Re: setAppStyleSheet

Post by Vadi »

This might be OS-specific... do you think you could show screenshots of how this looks before and after?

Nyyrazzilyss
Posts: 334
Joined: Thu Mar 05, 2015 2:53 am

Re: setAppStyleSheet

Post by Nyyrazzilyss »

2 screenshots attached, one with the above code commented out, the other with it present. In both screenshots, the mouse pointer is hovering above 'variables'. If it is os related, this is windows 10
before.png

after.png

User avatar
SlySven
Posts: 1034
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: setAppStyleSheet

Post by SlySven »

I seem to be missing the start of this conversation but I notice that the variables icon {":/icons/variables.png" in the resources file and also ./src/icons/variables.png in the source code} is a 48x48 pixel image, it is a colour icon but it has no colour content, just some anti-aliasing of the black foreground "X=" text with the transparent background. If your observation is that with a black background you cannot see the icon's details - then yes that will be the case.

As a fix I've just put the existing icon onto a "page" that I recreated from one of the Oxygen (GPL) set on my PC.:
New variables icon on a white page background
New variables icon on a white page background
variables.png (1.64 KiB) Viewed 9805 times
Is this enough to fix the issue I think you are having?

Nyyrazzilyss
Posts: 334
Joined: Thu Mar 05, 2015 2:53 am

Re: setAppStyleSheet

Post by Nyyrazzilyss »

Actually, it was about the instructions from using setAppStyleSheet on the wiki. Following those instructions, none of the icons changed colour or gave any indication of the mouse entering/or clicking them in windows 10.

I'd had to add the hover/focus settings to them

User avatar
Vadi
Posts: 5048
Joined: Sat Mar 14, 2009 3:13 pm

Re: setAppStyleSheet

Post by Vadi »

The screenshots make sense. Mind updating the default wiki code?

User avatar
SlySven
Posts: 1034
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: setAppStyleSheet

Post by SlySven »

In regard to the original issue and not the tangent I want off on: Qt4 setups used to have qtconfig to set the system wide defaults; but now Qt5 gets them from "the system" according to this U&L Stack Exchange question. Basically you do the same sort of things but with a command line -style and a predefined (built in, OS dependent) QtStyle name or -stylesheet and a style-sheet file name (with the sort of content that has already been mentioned).

Of course, since I've mangled the command line argument handling for 'Doze (I thought the argument introducer was the '/' character NOT the *nix '-') you may need to use "mudlet.exe /h" to get a command line mention of these {rather than mudlet.exe -help} but the Qt libraries will use the '-' as they intercept the command line arguments BEFORE our main() gets its hands on them.

Nyyrazzilyss
Posts: 334
Joined: Thu Mar 05, 2015 2:53 am

Re: setAppStyleSheet

Post by Nyyrazzilyss »

Vadi wrote:The screenshots make sense. Mind updating the default wiki code?
Would, but I don't have access to the wiki to change it.

User avatar
Vadi
Posts: 5048
Joined: Sat Mar 14, 2009 3:13 pm

Re: setAppStyleSheet

Post by Vadi »

Are you having trouble registering? Select "Log in with OpenID" to get started.

Nyyrazzilyss
Posts: 334
Joined: Thu Mar 05, 2015 2:53 am

Re: setAppStyleSheet

Post by Nyyrazzilyss »

Not sure if i'm doing something incorrectly - The normal login function doesn't work (can't find username) with the same username/password in use on the forums. If I try login with openid (google) it errors that it can't find the url.

Post Reply