background colour for glade box

More
19 Dec 2018 16:41 #122602 by bluephoenix
Hi there,
I have implemented in Gmoccapy two additional buttons with the help of glade in the box_custom_3 position.

The whole setup works fine, the button symbols change when I toggle them etc., but the only problem is that the background color of the whole frame is light grey, whereas the rest of gmoccapy is white. Does anybody know how I can change that?
Here is a screenshot of glade


Regards
albert
Attachments:

Please Log in or Create an account to join the conversation.

More
19 Dec 2018 20:07 #122609 by bluephoenix
One workaround I found out, is to set another theme, so that the rest of the GUI has the same grey. This is also ok for me now, but just for interest, if anybody knows an answer to my question, this would be fine.

Please Log in or Create an account to join the conversation.

More
19 Dec 2018 23:41 #122620 by cmorley
Was this added as a GladeVCP panel? If so then yes one needs to match the theme that Gmoccapy uses. There are programmical ways to change the color too - but you would need to add python code to do it. i don't recall the code required but I'm sure you could find the idea with Google if it's important to you.

Chris M

Please Log in or Create an account to join the conversation.

More
20 Dec 2018 06:49 #122631 by bluephoenix
Hi Chris,
thx for the reply. Yes the panel was added as a GladVCP panel and I already use Python code to switch the icons of the buttons when they are pressed, so any additional code could be added there. My search with Google did not gave the answer I wanted, at least the code I found was beyond my Python skills :). But anyway, I think we can close this thread, as it is ok for me to use a different theme.

Albert

Please Log in or Create an account to join the conversation.

More
20 Dec 2018 13:29 #122641 by cmorley

Please Log in or Create an account to join the conversation.

More
20 Dec 2018 22:22 #122660 by newbynobi
Please take a look at gmoccapy plasma sim config, i did some glade panels for that and the python files do handle themes. Within the python files the theme used is set also to the glade panels to archive the same optical caracter.

Norbert

Please Log in or Create an account to join the conversation.

More
21 Dec 2018 11:02 #122685 by bluephoenix
The plasma example shows the same behaviour on my machine.


Also in my python code, I put the following snipped from your plasma example

from gmoccapy import preferences
from gmoccapy import getiniinfo

get_ini_info = getiniinfo.GetIniInfo()
prefs = preferences.preferences(get_ini_info.get_preference_file_path())
theme_name = prefs.getpref("gtk_theme", "Follow System Theme", str)
if theme_name == "Follow System Theme":
theme_name = gtk.settings_get_default().get_property("gtk-theme-name")
gtk.settings_get_default().set_string_property("gtk-theme-name", theme_name, "")

which shows no difference.

Albert
Attachments:

Please Log in or Create an account to join the conversation.

Moderators: HansU
Time to create page: 0.232 seconds
Powered by Kunena Forum