Skip to content
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

Port to GTK 4 #749

Merged
merged 44 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from 43 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
ea9d0d7
AbstractInstallerView: replace ButtonBox with Boxes
danirabbit May 7, 2024
d7e5f8f
bump deps
danirabbit Feb 14, 2024
e916c62
Replace Deck with Leaflet
danirabbit Feb 14, 2024
0a9358f
Merge branch 'danirabbit/installer-actionarea' into danirabbit/gtk4
danirabbit May 14, 2024
bcd4f5f
Minor API adjustments
danirabbit May 14, 2024
5b79d84
Use add_css_class, Granite.STYLE_CLASS
danirabbit May 14, 2024
e42ff11
Remove show_all
danirabbit May 14, 2024
2e152be
box.append
danirabbit May 14, 2024
5b02220
Remove IconSize
danirabbit May 14, 2024
9da35d8
button.icon_name
danirabbit May 14, 2024
1be7169
fix some stack adds
danirabbit May 14, 2024
dd54b59
ScrolledWindow
danirabbit May 14, 2024
72b6c63
Leafle stuff
danirabbit May 14, 2024
ac61d52
Merge master
danirabbit May 28, 2024
a9a04b7
More stuff
danirabbit May 28, 2024
16563a8
more box adds
danirabbit May 28, 2024
8d3539e
ErrorRevealer
danirabbit May 28, 2024
cbf4ee6
Simplify buffer scrolling
danirabbit May 28, 2024
981e33d
more
danirabbit May 28, 2024
998bc41
Almost done
danirabbit May 28, 2024
6a31af6
Couple last things
danirabbit May 28, 2024
9c98c81
Make compile
danirabbit May 28, 2024
067f227
Fix bad subclasses
danirabbit May 28, 2024
1d7886a
Fix titlebar and h2 label
danirabbit May 28, 2024
785415a
merge master
danirabbit May 28, 2024
05f9b47
Merge master
danirabbit May 29, 2024
27a8afd
update css class syntax
danirabbit May 29, 2024
8ff834c
texture directly from resource
danirabbit May 29, 2024
49c23d9
Fix progressview css
danirabbit May 29, 2024
ea109cf
Fix bad merge in error view
danirabbit May 29, 2024
1ae3517
Isolate view size
danirabbit May 29, 2024
13695aa
Merge master
danirabbit Jun 5, 2024
3417fc7
fix title area
danirabbit Jun 5, 2024
12f99ec
Fix gradient direction
danirabbit Jun 6, 2024
95d1a5b
Use constraint layout for partitionbar
danirabbit Jun 6, 2024
3d076dd
Better unused size
danirabbit Jun 6, 2024
39aed24
Remove leftover css
danirabbit Jun 7, 2024
1d6854a
Merge branch 'master' into danirabbit/gtk4
danirabbit Jun 19, 2024
07ed65d
merge master
danirabbit Jun 20, 2024
6599c13
Style constant
danirabbit Jun 20, 2024
ba3a4db
Update README and CI
danirabbit Jun 21, 2024
84033ab
Merge branch 'master' into danirabbit/gtk4
zeebok Jul 2, 2024
b194138
Merge branch 'master' into danirabbit/gtk4
zeebok Jul 17, 2024
5a7109b
merge master
danirabbit Aug 6, 2024
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: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ jobs:
- name: Install Dependencies
run: |
apt update
apt install -y desktop-file-utils gettext libdistinst-dev libgtk-3-dev libgee-0.8-dev libgranite-dev libhandy-1-dev libxml2-dev libjson-glib-dev libpwquality-dev libxml2-utils meson valac
- name: Build
apt install -y desktop-file-utils gettext libadwaita-1-dev libdistinst-dev libgee-0.8-dev libgranite-7-dev libgtk-4-dev libxml2-dev libjson-glib-dev libpwquality-dev libxml2-utils meson valac
- name: Build and Test
env:
DESTDIR: out
run: |
meson build
ninja -C build
meson setup build
ninja -C build install

lint:
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ You'll need the following dependencies:
- gettext
- gparted
- libgnomekbd-dev
- libgranite-dev >= 0.5
- libgtk-3-dev
- libgranite-7-dev >=7.4.0
- libgtk-4-dev
- libgee-0.8-dev
- libhandy-1-dev
- libadwaita-1-dev >=1.0.0
- libjson-glib-dev
- libpwquality-dev
- libxml2-dev
Expand Down
122 changes: 122 additions & 0 deletions data/Application.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,125 @@
.button-box button {
min-width: 86px; /* https://github.com/elementary/granite/issues/577#issuecomment-1318979272 */
}

.logo {
animation: rainbow-bg 30s linear infinite;
background-image: linear-gradient(
to bottom,
alpha(@BLUEBERRY_500, 0.25),
alpha(@BLUEBERRY_700, 0.75)
);
border-radius: 50%;
box-shadow:
inset 0 -2px 0 0 alpha(@highlight_color, 0.2),
inset 0 2px 0 0 alpha(@highlight_color, 0.3),
inset 2px 0 0 0 alpha(@highlight_color, 0.07),
inset -2px 0 0 0 alpha(@highlight_color, 0.07),
inset 0 0 0 1px alpha(black, 0.7);
color: white;
-gtk-icon-shadow:
0 1px 1px alpha(black, 0.3),
0 2px 3px alpha(@BLUEBERRY_900, 0.2);
-gtk-icon-style: symbolic;
}

@keyframes rainbow-bg {
from {
background-image: linear-gradient(
to bottom,
alpha(@BLUEBERRY_500, 0.25),
alpha(@BLUEBERRY_700, 0.75)
);
-gtk-icon-shadow:
0 1px 1px alpha(black, 0.3),
0 2px 3px alpha(@BLUEBERRY_900, 0.2);
}

12.5% {
background-image: linear-gradient(
to bottom,
alpha(@MINT_500, 0.25),
alpha(@MINT_700, 0.75)
);
-gtk-icon-shadow:
0 1px 1px alpha(black, 0.3),
0 2px 3px alpha(@MINT_900, 0.2);
}

25% {
background-image: linear-gradient(
to bottom,
alpha(@LIME_500, 0.25),
alpha(@LIME_700, 0.75)
);
-gtk-icon-shadow:
0 1px 1px alpha(black, 0.3),
0 2px 3px alpha(@LIME_900, 0.2);
}

37.5% {
background-image: linear-gradient(
to bottom,
alpha(@BANANA_500, 0.25),
alpha(@BANANA_700, 0.75)
);
-gtk-icon-shadow:
0 1px 1px alpha(black, 0.3),
0 2px 3px alpha(@BANANA_900, 0.2);
}

50% {
background-image: linear-gradient(
to bottom,
alpha(@ORANGE_500, 0.25),
alpha(@ORANGE_700, 0.75)
);
-gtk-icon-shadow:
0 1px 1px alpha(black, 0.3),
0 2px 3px alpha(@ORANGE_900, 0.2);
}

62.5% {
background-image: linear-gradient(
to bottom,
alpha(@STRAWBERRY_500, 0.25),
alpha(@STRAWBERRY_700, 0.75)
);
-gtk-icon-shadow:
0 1px 1px alpha(black, 0.3),
0 2px 3px alpha(@STRAWBERRY_900, 0.2);
}

75% {
background-image: linear-gradient(
to bottom,
alpha(@BUBBLEGUM_500, 0.25),
alpha(@BUBBLEGUM_700, 0.75)
);
-gtk-icon-shadow:
0 1px 1px alpha(black, 0.3),
0 2px 3px alpha(@BUBBLEGUM_900, 0.2);
}

87.5% {
background-image: linear-gradient(
to bottom,
alpha(@GRAPE_500, 0.25),
alpha(@GRAPE_700, 0.75)
);
-gtk-icon-shadow:
0 1px 1px alpha(black, 0.3),
0 2px 3px alpha(@GRAPE_900, 0.2);
}

to {
background-image: linear-gradient(
to bottom,
alpha(@BLUEBERRY_500, 0.25),
alpha(@BLUEBERRY_700, 0.75)
);
-gtk-icon-shadow:
0 1px 1px alpha(black, 0.3),
0 2px 3px alpha(@BLUEBERRY_900, 0.2);
}
}
146 changes: 0 additions & 146 deletions data/ProgressView.css

This file was deleted.

5 changes: 0 additions & 5 deletions data/disk-bar-fallback.css
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,3 @@ levelbar block image {
0 1px 1px alpha(#000, 0.2),
0 1px 3px alpha(#000, 0.1);
}

levelbar .h4 {
opacity: 1;
padding: 0;
}
1 change: 0 additions & 1 deletion data/io.elementary.installer.gresource.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<gresource prefix="/io/elementary/installer">
<file compressed="true">Application.css</file>
<file alias="disk-bar-fallback.css" compressed="true">disk-bar-fallback.css</file>
<file alias="ProgressView.css" compressed="true">ProgressView.css</file>
<file compressed="true">wallpaper.jpg</file>
</gresource>
<gresource prefix="/io/elementary/installer/icons">
Expand Down
6 changes: 3 additions & 3 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ i18n = import('i18n')
distinst_dep = dependency('distinst')
glib_dep = dependency('glib-2.0', version: '>=2.74')
gobject_dep = dependency('gobject-2.0')
gtk_dep = dependency('gtk+-3.0')
gtk_dep = dependency('gtk4')
gee_dep = dependency('gee-0.8')
gio_dep = dependency('gio-2.0')
granite_dep = dependency('granite', version: '>=0.5')
handy_dep = dependency('libhandy-1', version: '>=0.90.0')
granite_dep = dependency('granite-7', version: '>=7.4.0')
adw_dep = dependency('libadwaita-1', version: '>=1.0.0')
json_glib_dep = dependency('json-glib-1.0')
xml2_dep = dependency('libxml-2.0')
pwquality_dep = dependency('pwquality')
Expand Down
15 changes: 4 additions & 11 deletions src/Application.vala
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,12 @@ public class Installer.App : Gtk.Application {
public override void startup () {
base.startup ();

var css_provider = new Gtk.CssProvider ();
css_provider.load_from_resource ("io/elementary/installer/Application.css");

Gtk.StyleContext.add_provider_for_screen (
Gdk.Screen.get_default (),
css_provider,
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
);
Granite.init ();

var css_fallback = new Gtk.CssProvider ();
css_fallback.load_from_resource ("io/elementary/installer/disk-bar-fallback.css");
Gtk.StyleContext.add_provider_for_screen (
Gdk.Screen.get_default (),
Gtk.StyleContext.add_provider_for_display (
Gdk.Display.get_default (),
css_fallback,
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
);
Expand All @@ -58,7 +51,7 @@ public class Installer.App : Gtk.Application {
icon_name = application_id,
title = _("Install %s").printf (Utils.get_pretty_name ())
};
window.show_all ();
window.present ();
add_window (window);

inhibit (
Expand Down
Loading
Loading