Gmocappy defects in release 2.9.2

More
26 Dec 2023 22:05 #289117 by Serg452
In this release the turtle jog bug is solved, but the old tails remain. These are not critical errors, but fixing them will make gmoccapy better. Perhaps the developers will take this into account in the 2.9.3 release.
1. unreadable line in dark themes
 

2.In AUTO mode some hbox icons of the wrong small size, green marked the correct corresponding vbox. This does not depend on the set of icons.
 
 
Attachments:

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

More
27 Dec 2023 08:57 #289151 by Aciera

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

More
27 Dec 2023 09:23 #289153 by Serg452

For a fix regarding the text theme see:
forum.linuxcnc.org/forum/search?query=ob...Aciera&childforums=1
 

looks like it does in 2.9.2 it doesn't help. Or did I look bad? At 2.9.1 it worked well for me

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

More
27 Dec 2023 16:14 #289180 by Aciera
Still works for me.
Note: if you have not compiled linuxcnc yourself then you would need to modify:

/usr/lib/python3/dist-packages/gladevcp/hal_sourceview.py

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

More
28 Dec 2023 16:06 #289258 by HansU
Regarding the icon sizes: The reason why some of them are bigger than the others is because some of the classic icons are in a landscape format so they have to be bigger to have same height while having a bigger width.
I must admit that this is not optimal for other icon themes.
As I understood you want the lower buttons all in 48x48. But this would look weird with the other icon themes.
Look at this for example:

 

I will think about what a good solution could be. Until that, you can change the icon sizes wit a user command file
(see linuxcnc.org/docs/html/gui/gmoccapy.html#_user_command_file) with the following content
icon_configs = [
    # widget, named_icon, size
    # auto mode buttons
    ("img_open",            "open_file",                        48),
    ("img_reload1",         "refresh",                          48),
    ("img_run",             "play",                             48),
    ("img_stop",            "stop",                             48),
    ("img_pause",           "pause",                            48),
    ("img_pause_active",    "pause_active",                     48),
    ("img_step",            "step",                             48),
    ("img_run_from",        "run_from_line",                    48),
    ("img_editor",          "edit_code",                        48),
    ("img_skip_optional_active",    "skip_optional_active",     48),
    ("img_skip_optional_inactive",  "skip_optional_inactive",   48),
]

# default style context see TODO below
default_style = Gtk.Button().get_style_context()

failed_icons = 0
for widget_name, icon_name, size in icon_configs:
    try:
        image = self.widgets[widget_name]
        pixbuf = icon_theme_helper.load_symbolic_from_icon_theme(self.icon_theme, icon_name, size, default_style)
        image.set_from_pixbuf(pixbuf)
        image.set_size_request(size, size)
    except BaseException as err:
        LOG.warning(f"Failed to change icon for <{widget_name}> to '{icon_name}': {str(err)}")
        failed_icons += 1
Attachments:
The following user(s) said Thank You: Serg452

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

More
28 Dec 2023 16:52 #289264 by HansU
Regarding the Source View style for dark themes (1):

You can change this by adding this line in the above mentioned user command file (linuxcnc.org/docs/html/gui/gmoccapy.html#_user_command_file)
self.widgets["gcode_view"].set_style_scheme("oblivion")
(Thanks to Aciera for the hint)

On my system (Bookworm) there are following available, you can also try some others: 'kate', 'classic', 'cobalt', 'oblivion', 'solarized-dark', 'solarized-light', 'tango'



 
The following user(s) said Thank You: HalaszAttila

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

More
28 Dec 2023 18:52 #289272 by HansU
I implemented the Theme thingy now as a setting, so will be available soon ;-)

github.com/LinuxCNC/linuxcnc/pull/2811
The following user(s) said Thank You: HalaszAttila, 0x2102, besriworld, Serg452

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

More
28 Dec 2023 21:29 #289282 by Serg452

I implemented the Theme thingy now as a setting, so will be available soon ;-)

github.com/LinuxCNC/linuxcnc/pull/2811
 

Great idea!

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

More
28 Dec 2023 22:25 #289286 by Serg452
Everything is fine with the buttons.
And there is a problem with the code - the selected code is clearly visible, and the active one is hidden against a bright background.
 
You have to replace in the code with something darker self.add_mark_category ('motion', '# 1c1c1c')
Is it possible to take this to the USER_COMMAND_FILE to exclude overwriting during updates?
Attachments:

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

More
29 Dec 2023 18:27 #289324 by HansU
I added another commit. I hope this is fine for you as well.
Yes you can set this also with the user command file, just add
self.widgets["gcode_view"].add_mark_category('motion', "black")
But as soon as you change the G-code theme, this will be overwritten until you start Linuxcnc the next time.
 
The following user(s) said Thank You: besriworld, Serg452

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

Moderators: newbynobiHansU
Time to create page: 0.334 seconds
Powered by Kunena Forum