Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions data/Application.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,8 @@
margin-right: -4px;
}

.header-area label.title-2 {
font-weight: 600;
font-size: 2rem;
}

.header-area label:not(.title-2) {
font-size: 0.95rem;
opacity: 0.85;
.header-area .title-2 {
margin-top: 0;
}

.content-area {
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ executable(
dependencies: [
dependency('glib-2.0', version: '>= 2.78'),
dependency('gobject-2.0'),
dependency('granite-7'),
dependency('granite-7', version: '>= 7.7.0'),
dependency('gtk4'),
dependency('gtksourceview-5')
],
Expand Down
31 changes: 10 additions & 21 deletions src/IconView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,10 @@ public class IconView : Gtk.Box {
valign = Gtk.Align.START
};

var title_label = new Gtk.Label (icon_name) {
selectable = true,
wrap = true,
xalign = 0,
valign = Gtk.Align.END
};
title_label.add_css_class (Granite.STYLE_CLASS_H2_LABEL);

var description_label = new Gtk.Label (description) {
selectable = true,
wrap = true,
halign = Gtk.Align.START,
xalign = 0,
valign = Gtk.Align.START
var label = new Granite.HeaderLabel (icon_name) {
secondary_text = description,
size = H2,
valign = CENTER
};

var window_controls = new Gtk.WindowControls (Gtk.PackType.END) {
Expand All @@ -46,12 +36,11 @@ public class IconView : Gtk.Box {
valign = Gtk.Align.START
};

var header_area = new Gtk.Grid ();
var header_area = new Granite.Box (HORIZONTAL, NONE);
header_area.add_css_class ("header-area");
header_area.attach (title_label, 1, 0);
header_area.attach (header_icon, 0, 0, 1, 2);
header_area.attach (description_label, 1, 1, 2);
header_area.attach (window_controls, 2, 0, 1, 2);
header_area.append (header_icon);
header_area.append (label);
header_area.append (window_controls);

var header_handle = new Gtk.WindowHandle () {
child = header_area
Expand Down Expand Up @@ -174,8 +163,8 @@ public class IconView : Gtk.Box {
});

bind_property ("icon-name", header_icon, "icon-name");
bind_property ("icon-name", title_label, "label");
bind_property ("description", description_label, "label");
bind_property ("icon-name", label, "label");
bind_property ("description", label, "secondary-text");

notify["icon-name"].connect (() => {
fill_icon_row (icon_name, color_row);
Expand Down
Loading