Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GTK/X11: empty "Set Highlight" menu #153

Closed
hillu opened this issue Mar 25, 2022 · 0 comments
Closed

GTK/X11: empty "Set Highlight" menu #153

hillu opened this issue Mar 25, 2022 · 0 comments
Labels
Milestone

Comments

@hillu
Copy link

hillu commented Mar 25, 2022

On my system, GTK seems to be configured to not show icons in menus. (I haven't figured out how o enable those), so while the submenu contains six entries that result in highlights with different colors, visually it appears to be entirely empty.

I suggest adding a text representation to the menu. The following is too simple because it ends up producing rgb(x, y, z) entries for everything but "red" on my system.

index d106dea..844ef85 100644
--- a/src/Tab.cpp
+++ b/src/Tab.cpp
@@ -1003,10 +1003,10 @@ void REHex::Tab::OnDataRightClick(wxCommandEvent &event)
                
                for(int i = 0; i < Palette::NUM_HIGHLIGHT_COLOURS; ++i)
                {
-                       wxMenuItem *itm = new wxMenuItem(hlmenu, wxID_ANY, " ");
-
                        wxColour bg_colour = active_palette->get_highlight_bg(i);
                        
+                       wxMenuItem *itm = new wxMenuItem(hlmenu, wxID_ANY, bg_colour.GetAsString());
+
                        /* TODO: Get appropriate size for menu bitmap.
                         * TODO: Draw a character in image using foreground colour.
                        */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants