-
-
Notifications
You must be signed in to change notification settings - Fork 47
Monitor GTK4 port #443
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
base: main
Are you sure you want to change the base?
Monitor GTK4 port #443
Conversation
core_label_list[i].get_style_context ().remove_class ("core_badge-mild-warning"); | ||
core_label_list[i].get_style_context ().remove_class ("core_badge-strong-warning"); | ||
core_label_list[i].get_style_context ().remove_class ("core_badge-critical-warning"); | ||
core_label_list[i].remove_css_class ("core_badge-mild-warning"); |
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.
Another case where you can use css_classes
to set what it should be without having to manually remove
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.
css_classes
also overwrites base widget styles. The solution would be to have a special method for a specific styles, e.g. core_label_list[i].set_state_warning ()
. I think it can be done in another PR :)
var button_more_info = new Gtk.ToggleButton () { | ||
has_focus = false, | ||
var button_more_info = new Gtk.MenuButton () { | ||
focusable = false, |
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.
Probably don't want to do this. This will make the button unable to be navigated to by keyboard
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.
For me, It prevents to be focused by default when opening SystemView, but I'm still able to select it with a tab button.
@@ -156,9 +166,10 @@ public class Monitor.SystemCPUView : Monitor.WidgetResource { | |||
} | |||
} | |||
var threads_label = new Gtk.Label (_("THREADS")); | |||
threads_label.get_style_context ().add_class ("small-text"); | |||
threads_label.add_css_class ("small-text"); |
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.
Should this be constant instead?
threads_label.add_css_class ("small-text"); | |
threads_label.add_css_class (Granite.STYLE_CLASS_SMALL_LABEL); |
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.
This constant is indeed close to small-text
style, however I would restrain from visual changes in this PR. We can come back to that in another PR with a proper CPU widget overhaul.
Co-authored-by: Danielle Foré <danielle@elementary.io>
Co-authored-by: Danielle Foré <danielle@elementary.io>
Co-authored-by: Danielle Foré <danielle@elementary.io>
…ion in ProcessInfoView
@@ -19,6 +19,8 @@ public class Monitor.CPUProcessTreeView : Gtk.TreeView { | |||
regex = /(?i:^.*\.(xpm|png)$)/; // vala-lint=space-before-paren, | |||
/* *INDENT-ON* */ | |||
|
|||
enable_search = false; |
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.
Something leftover from a bad merge?
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.
Not really. But I did use regex to match icon path in multiple places. In past, there were issues with getting the right icon for some apps. But I can't see any issues now, so removed this regex together with the if
block.
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.
Sorry this comment was about adding the "enable_search = false" which doesn't seem to be used anywhere
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.
It is used in CPUTreeView. I have added it to disable searchbox to appear in tree view.
…esTreeView constructor
…nal check for revealed state
Note: Indicator build is disabled for now. Waiting for Wingpanel GTK4 port to finish.
Note: Deprecation warnings connected to TreeView, TreeIter, TreeViewColumn, CellRendererPixbuf are out of scope for this PR.
To Fix:
button_more_info