Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
G
gnome-software
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
28
Issues
28
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Librem5
gnome-software
Commits
4f82d727
Commit
4f82d727
authored
Sep 04, 2019
by
Adrien Plazas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
librem5: updates-section: Make the header vertical
parent
01a57f6b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
src/gs-updates-section.c
src/gs-updates-section.c
+8
-3
No files found.
src/gs-updates-section.c
View file @
4f82d727
...
...
@@ -432,7 +432,11 @@ _build_section_header (GsUpdatesSection *self)
}
/* create header */
header
=
gtk_box_new
(
GTK_ORIENTATION_HORIZONTAL
,
3
);
header
=
gtk_box_new
(
GTK_ORIENTATION_VERTICAL
,
6
);
gtk_widget_set_margin_start
(
header
,
6
);
gtk_widget_set_margin_end
(
header
,
6
);
gtk_widget_set_margin_top
(
header
,
6
);
gtk_widget_set_margin_bottom
(
header
,
6
);
context
=
gtk_widget_get_style_context
(
header
);
gtk_style_context_add_class
(
context
,
"app-listbox-header"
);
...
...
@@ -440,14 +444,15 @@ _build_section_header (GsUpdatesSection *self)
gtk_widget_set_hexpand
(
label
,
TRUE
);
gtk_container_add
(
GTK_CONTAINER
(
header
),
label
);
gtk_widget_set_visible
(
label
,
TRUE
);
gtk_widget_set_
margin_start
(
label
,
6
);
gtk_label_set_
xalign
(
GTK_LABEL
(
label
),
0
.
0
);
gtk_widget_set_
halign
(
label
,
GTK_ALIGN_CENTER
);
gtk_label_set_
ellipsize
(
GTK_LABEL
(
label
),
PANGO_ELLIPSIZE_END
);
context
=
gtk_widget_get_style_context
(
label
);
gtk_style_context_add_class
(
context
,
"app-listbox-header-title"
);
/* use a stack so we can switch which buttons are showing without the
* sizegroup resizing */
self
->
button_stack
=
GTK_STACK
(
gtk_stack_new
());
gtk_widget_set_halign
(
GTK_WIDGET
(
self
->
button_stack
),
GTK_ALIGN_CENTER
);
gtk_container_add
(
GTK_CONTAINER
(
header
),
GTK_WIDGET
(
self
->
button_stack
));
gtk_container_child_set
(
GTK_CONTAINER
(
header
),
GTK_WIDGET
(
self
->
button_stack
),
"pack-type"
,
GTK_PACK_END
,
NULL
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment