-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
Added hacky drop-down with "replace all instances" on color rows #285
Added hacky drop-down with "replace all instances" on color rows #285
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of implicit right-click action it should be a linked dropdown button with menu, with at the moment only one menu item "Replace all occurrences", so users could know what there is an extra action attached to color button
that would also help to avoid most of the modifications
also, dropdown anyway will be needed for #112 and few other planned features |
Thank you for the feedback--I'll work on this tomorrow. :) |
I do not see this in my environment; the color_entry boxes are essentially simple text boxes. In fact, in my environment the octothorp isn't even present in the value, for example https://imgur.com/X3HvXML.png. I'll look more into this tomorrow, and how it might be implemented on a Gtk.Entry object or however it will need to work. |
it's currently a linked group of text entry and color button to the same linked group should be added a third item, a dropdown button with menu ignore the octothorp, that's not related to the point, that's not a screenshot from oomox, but a demonstration of how linked entry with dropdown button look like |
I apologize: I'm not a programmer by trade, and this is my first "contribution." I didn't grok/understand your ("linked" (style)) terminology until I searched a bit. I feel I have accomplished what you've requested, except "avoiding most of the modifications" a la your first review. |
oomox_gui/colors_list.py
Outdated
self.color_entry.get_style_context().add_class(Gtk.STYLE_CLASS_MONOSPACE) | ||
linked_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL) | ||
Gtk.StyleContext.add_class( | ||
linked_box.get_style_context(), "linked" | ||
) | ||
linked_box.add(self.color_entry) | ||
linked_box.add(self.menu_button) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please swap places of menu_button and color_button (so the dropdown will be rightmost)
oomox_gui/colors_list.py
Outdated
|
||
def replace_all_instances(self, _menu_item): # pylint:disable=unused-argument | ||
|
||
_menu_item = self._menu_item # noqa: F841 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's bad you ignored the warning -- it seems it should be:
self._menu_item = _menu_item
by "avoiding most of the modifications" i meant exactly the state of your PR as it is now :) |
oomox_gui/colors_list.py
Outdated
|
||
def replace_all_instances(self, _menu_item): # pylint:disable=unused-argument | ||
|
||
_menu_item = self._menu_item # noqa: F841 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
however it doesn't seems you need this line at all, as _menu_item
is not used next in the code
Thank you for your (extra) help. Let me know if you want any other modifications. I love this piece of software. 👍 |
thanks for your dedication on polishing the pull request! |
It bothers me that this fails the Travis "build;" I would like to assist with some other functionalities. I think, at this point, that makes you a Senior Software Engineer. |
Oops, after adding translation support the line became too long
…On Sat, 29 Feb 2020 at 08:08, Dennis Zarger II ***@***.***> wrote:
It bothers me that this fails the Travis "build;" I would like to assist
with some other functionalities. I think, at this point, that makes you a
Senior Software Engineer.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#285>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMUG5OEKLNERXORE3GXU63RFCZ6TANCNFSM4KZUYMNQ>
.
|
green again :) |
I probably need help on this; but I really want to be able to change all matching colors in the ColorsList globally somehow. With this pull, you can functionally right click on a colorbutton and all rows with matching colors will also be changed to the selected color.
It's a small modification, but it's definitely not done the correct way. Please point me in the correct direction.
Modified colors_list.OomoxColorButton: