Page 1 of 2

setAppStyleSheet

Posted: Wed May 18, 2016 1:06 pm
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)

Re: setAppStyleSheet

Posted: Tue Sep 13, 2016 1:14 am
by Vadi
This might be OS-specific... do you think you could show screenshots of how this looks before and after?

Re: setAppStyleSheet

Posted: Tue Sep 13, 2016 1:54 am
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

Re: setAppStyleSheet

Posted: Tue Sep 13, 2016 2:35 am
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 8721 times
Is this enough to fix the issue I think you are having?

Re: setAppStyleSheet

Posted: Tue Sep 13, 2016 2:52 am
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

Re: setAppStyleSheet

Posted: Tue Sep 13, 2016 3:42 am
by Vadi
The screenshots make sense. Mind updating the default wiki code?

Re: setAppStyleSheet

Posted: Tue Sep 13, 2016 1:28 pm
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.

Re: setAppStyleSheet

Posted: Tue Sep 13, 2016 1:57 pm
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.

Re: setAppStyleSheet

Posted: Tue Sep 13, 2016 7:37 pm
by Vadi
Are you having trouble registering? Select "Log in with OpenID" to get started.

Re: setAppStyleSheet

Posted: Wed Sep 14, 2016 5:39 pm
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.