Skip to content

SettingsSidebarRow: use Granite.HeaderLabel - #409

Open
danirabbit wants to merge 4 commits into
mainfrom
danirabbit/settingssidebar-headerlabel
Open

danirabbit wants to merge 4 commits into
mainfrom
danirabbit/settingssidebar-headerlabel

Conversation

@danirabbit

Copy link
Copy Markdown
Member
  • Use HeaderLabel instead of multiple labels
  • Use Granite.Box instead of setting margins manually

@danirabbit
danirabbit requested a review from a team November 3, 2026 17:23
@danirabbit danirabbit added this to OS 9 Nov 3, 2026
@danirabbit danirabbit moved this to Needs Review in OS 9 Nov 3, 2026

@leolost2605 leolost2605 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, only one comment :)

Comment thread lib/SettingsSidebarRow.vala Outdated
Comment on lines +31 to +34
public Icon icon { get; set; }

public string status {
set {
status_label.label = value;
status_label.visible = true;
update_property (Gtk.AccessibleProperty.DESCRIPTION, value, -1);
}
}

public string title {
get {
return _title;
}
set {
_title = value;
title_label.label = value;
update_property (Gtk.AccessibleProperty.LABEL, value, -1);
}
}
public string? header { get; set; }
public string? status { get; set; }
public string title { get; set; }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should drop those properties. Ig in the past they were used as an easy way to bind properties from the page that set the appropriate things but with this PR that's not necessary anymore. The only thing that's used from the outside afaict is header and I think the user should instead go through our page property.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually wonder if we shouldn't go the other way around. Eventually I want to use ListView instead of ListBox since we have some sidebars with lots of searchable items and rows should be settable. At the moment we have some custom sidebar implementations and it would be nice to make this widget public and re-use it, without having to use SettingsPage since there's a lot of assumptions about it being used with a Stack and with few items etc that shouldn't apply in the future

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed them for now since they're unused, though and we can revisit that later I suppose

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs Review

Development

Successfully merging this pull request may close these issues.

2 participants