Ver 3.1.3.10 Screen won't re-size

More
26 Dec 2021 18:02 - 26 Dec 2021 18:05 #230026 by HansU
Norbert, I think you know that the bigger padding causes this problem.
On a stand-alone GUI I could get this padding reduced with CSS, but it didn't work inside gmoccapy.
Here only as a hint, (but I am sure you already know ;-) ):
Also setting it on every button is not very practicable.
from gi.repository import Gtk
from gi.repository import Gdk

win = Gtk.Window()
btn = Gtk.Button("Padding 0")
screen = Gdk.Screen.get_default()
provider = Gtk.CssProvider()
style_context = Gtk.StyleContext()
style_context.add_provider_for_screen(screen, provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
provider.load_from_data("#small {padding: 0;}".encode())
btn.set_name('small') # assign CSS with padding 0
win.add(btn)
win.show_all()
win.connect('destroy', Gtk.main_quit)
Gtk.main()
[from stackoverflow.com/questions/61375905/gtk...ng-of-internal-label]
Last edit: 26 Dec 2021 18:05 by HansU.

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

More
31 Jan 2022 17:47 #233652 by HansU
I have a fix for that. Have a look at github.com/LinuxCNC/linuxcnc/pull/1557

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

Moderators: newbynobi
Time to create page: 0.107 seconds
Powered by Kunena Forum