-
-
Notifications
You must be signed in to change notification settings - Fork 48
LabelRoundy: rewrite #449
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
Merged
Merged
LabelRoundy: rewrite #449
Changes from 10 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
c01b8c6
LabelRoundy: rewrite
danirabbit d5ca795
Merge main
danirabbit 75425e1
Merge branch 'main' into danirabbit/roundylabel-cleanups
stsdc 3450a27
Fix: Add missing closing brace for .dim-label in _index.scss
stsdc 83b9a07
Remove unnecessary submodule checkout from CI workflow
stsdc 216e1b1
Update _index.scss
danirabbit 5118cfe
Merge branch 'main' into danirabbit/roundylabel-cleanups
stsdc 533b0d2
use proper style constants for small/dim label
danirabbit 2ac42e0
Fix bad merge
danirabbit f3af01c
Merge branch 'main' into danirabbit/roundylabel-cleanups
danirabbit 7980973
Merge branch 'main' into danirabbit/roundylabel-cleanups
stsdc d058eab
Set horizontal alignment for LabelRoundy to START
stsdc 5de1374
Merge branch 'main' into danirabbit/roundylabel-cleanups
stsdc d6571b9
Remove submodule checkout from CI workflow to fix failing build
stsdc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,29 +3,44 @@ | |
| * SPDX-License-Identifier: GPL-3.0-or-later | ||
| */ | ||
|
|
||
| public class Monitor.LabelRoundy : Gtk.Fixed { | ||
| public Gtk.Label val; | ||
| public Gtk.Label desc; | ||
| public class Monitor.LabelRoundy : Gtk.Box { | ||
| public string title { get; construct; } | ||
|
|
||
| public LabelRoundy (string description) { | ||
| val = new Gtk.Label (Utils.NO_DATA) { | ||
| selectable = true | ||
| }; | ||
| val.get_style_context ().add_class ("roundy-label"); | ||
|
|
||
| desc = new Gtk.Label (description.up ()); | ||
| desc.get_style_context ().add_class ("small-text"); | ||
| public string text { | ||
| set { | ||
| val.label = value; | ||
| } | ||
| } | ||
|
|
||
| put (val, 0, 12); | ||
| put (desc, 6, 0); | ||
| public int width_chars { | ||
| set { | ||
| val.width_chars = value; | ||
| } | ||
| } | ||
|
|
||
| public void set_color (string colorname) { | ||
| val.get_style_context ().add_class (colorname); | ||
| private Gtk.Label val; | ||
|
|
||
| public LabelRoundy (string title) { | ||
| Object (title: title); | ||
| } | ||
|
|
||
| public void set_text (string text) { | ||
| val.set_text (text); | ||
| class construct { | ||
| set_css_name ("roundy-label"); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in d058eab |
||
| } | ||
|
|
||
| construct { | ||
| val = new Gtk.Label (Utils.NO_DATA) { | ||
| selectable = true | ||
| }; | ||
| val.get_style_context ().add_class ("value"); | ||
|
|
||
| var header_label = new Granite.HeaderLabel (title.up ()) { | ||
| mnemonic_widget = val | ||
| }; | ||
| header_label.get_style_context ().add_class (Granite.STYLE_CLASS_SMALL_LABEL); | ||
|
|
||
| orientation = VERTICAL; | ||
| add (header_label); | ||
| add (val); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Uh oh!
There was an error while loading. Please reload this page.