Skip to content

Commit 4cd5317

Browse files
authored
Merge branch 'main' into release-7.7.0
2 parents 254d263 + f3573d0 commit 4cd5317

File tree

433 files changed

+32788
-13495
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

433 files changed

+32788
-13495
lines changed

.github/workflows/gettext.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99

1010
steps:
1111
- name: Clone repository
12-
uses: actions/checkout@v4
12+
uses: actions/checkout@v5
1313
with:
1414
token: ${{ secrets.GIT_USER_TOKEN }}
1515

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ jobs:
77
runs-on: ubuntu-latest
88

99
steps:
10-
- uses: actions/checkout@v4
11-
- uses: elementary/actions/vala-lint@master
10+
- uses: actions/checkout@v5
11+
- uses: elementary/actions/vala-lint@main

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
image: ghcr.io/elementary/docker:${{ matrix.version }}
2020

2121
steps:
22-
- uses: actions/checkout@v4
22+
- uses: actions/checkout@v5
2323
- name: Install Dependencies
2424
run: |
2525
apt update

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ jobs:
99
runs-on: ubuntu-latest
1010
if: github.event.pull_request.merged == true && true == contains(join(github.event.pull_request.labels.*.name), 'Release')
1111
steps:
12-
- uses: actions/checkout@v4
13-
- uses: elementary/actions/release@master
12+
- uses: actions/checkout@v5
13+
- uses: elementary/actions/release@main
1414
env:
1515
GIT_USER_TOKEN: "${{ secrets.GIT_USER_TOKEN }}"
1616
GIT_USER_NAME: "elementaryBot"

data/granite.metainfo.xml.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
<issues>
6767
<issue url="https://github.com/elementary/granite/issues/742">adw-entry-apply-symbolic</issue>
6868
<issue url="https://github.com/elementary/granite/issues/802">Provide native support for libshumate</issue>
69+
<issue url="https://github.com/elementary/granite/issues/874">Default icon themes by non-Pantheon desktops may have missing icons or use incorrect icons</issue>
6970
<issue url="https://github.com/elementary/granite/issues/883">PopoverAccelLabel styles broken in Demo</issue>
7071
</issues>
7172
</release>

demo/Views/BoxView.vala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ public class BoxView : DemoPage {
1212
};
1313

1414
var single_box = new Granite.Box (HORIZONTAL);
15-
single_box.append (new Gtk.Image.from_icon_name ("application-default-icon") { icon_size = LARGE });
16-
single_box.append (new Gtk.Image.from_icon_name ("application-default-icon") { icon_size = LARGE });
15+
single_box.append (new Gtk.Image.from_icon_name ("package-x-generic") { icon_size = LARGE });
16+
single_box.append (new Gtk.Image.from_icon_name ("package-x-generic") { icon_size = LARGE });
1717

1818
var single_container = new Granite.Box (VERTICAL);
1919
single_container.append (single_header);
@@ -24,8 +24,8 @@ public class BoxView : DemoPage {
2424
};
2525

2626
var double_box = new Granite.Box (HORIZONTAL, DOUBLE);
27-
double_box.append (new Gtk.Image.from_icon_name ("application-default-icon") { icon_size = LARGE });
28-
double_box.append (new Gtk.Image.from_icon_name ("application-default-icon") { icon_size = LARGE });
27+
double_box.append (new Gtk.Image.from_icon_name ("package-x-generic") { icon_size = LARGE });
28+
double_box.append (new Gtk.Image.from_icon_name ("package-x-generic") { icon_size = LARGE });
2929

3030
var double_container = new Granite.Box (VERTICAL);
3131
double_container.append (double_header);

demo/Views/MapsView.vala

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,34 @@
44
*/
55

66
public class MapsView : DemoPage {
7+
private string styles = "
8+
map-marker.self {
9+
background-color: @base_color;
10+
border-radius: 50%;
11+
box-shadow:
12+
0 0 0 1px @borders,
13+
0 3px 4px alpha(black, 0.15),
14+
0 3px 3px -3px alpha(black, 0.35);
15+
padding: 0.25rem;
16+
}
17+
18+
map-marker.self grid {
19+
background: @accent_color;
20+
color: white;
21+
border-radius: 50%;
22+
min-height: 1rem;
23+
min-width: 1rem;
24+
}
25+
";
26+
727
construct {
828
title = "Shumate.SimpleMap";
929

30+
var style_provider = new Gtk.CssProvider ();
31+
style_provider.load_from_string (styles);
32+
33+
Gtk.StyleContext.add_provider_for_display (Gdk.Display.get_default (), style_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
34+
1035
var registry = new Shumate.MapSourceRegistry.with_defaults ();
1136

1237
var simple_map = new Shumate.SimpleMap () {
@@ -21,20 +46,28 @@ public class MapsView : DemoPage {
2146
simple_map.add_css_class (Granite.CssClass.CARD);
2247

2348
var point = new Shumate.Marker () {
24-
child = new Gtk.Image.from_icon_name ("emblem-favorite-symbolic"),
49+
child = new Gtk.Image.from_icon_name ("map-marker") { pixel_size = 48 },
2550
latitude = 38.580753,
2651
longitude = -121.487300
2752
};
2853

54+
var self_point = new Shumate.Marker () {
55+
child = new Gtk.Grid (),
56+
latitude = 38.575764,
57+
longitude = -121.478851
58+
};
59+
self_point.add_css_class ("self");
60+
2961
var marker_layer = new Shumate.MarkerLayer.full (simple_map.viewport, SINGLE);
3062
marker_layer.add_marker (point);
63+
marker_layer.add_marker (self_point);
3164

3265
var map_view = simple_map.viewport;
3366
map_view.zoom_level = 15;
3467

3568
var map = simple_map.map;
3669
map.add_layer (marker_layer);
37-
map.center_on (38.575764, -121.478851);
70+
map.center_on (self_point.latitude, self_point.longitude);
3871

3972
child = simple_map;
4073
}

demo/data/demo.gresource.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@
33
<gresource prefix="/io/elementary/granite/demo/icons">
44
<file alias="32x32/actions/git.svg" compressed="true" preprocess="xml-stripblanks">git.svg</file>
55
<file alias="32x32/actions/valadoc.svg" compressed="true" preprocess="xml-stripblanks">valadoc.svg</file>
6+
7+
<file alias="48x48/places/map-marker.svg" compressed="true" preprocess="xml-stripblanks">map-marker.svg</file>
68
</gresource>
79
</gresources>

demo/data/map-marker.svg

Lines changed: 220 additions & 0 deletions
Loading

lib/Init.vala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ namespace Granite {
2020

2121
typeof (Granite.Settings).ensure ();
2222

23+
/*
24+
* gdk_display_manager_get() requires gtk_init() is already called since
25+
* Gtk 4.17, so initialize Gtk explicitly
26+
* See also https://gitlab.gnome.org/GNOME/gnome-initial-setup/-/issues/223
27+
*/
28+
Gtk.init ();
29+
2330
unowned var display_manager = Gdk.DisplayManager.@get ();
2431
display_manager.display_opened.connect (StyleManager.init_for_display);
2532

0 commit comments

Comments
 (0)