Skip to content

Commit

Permalink
MainWindow: center with pantheon protocol (#841)
Browse files Browse the repository at this point in the history
  • Loading branch information
danirabbit authored Nov 10, 2024
1 parent 6a764f4 commit a19982a
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Install Dependencies
run: |
apt update
apt install -y desktop-file-utils gettext libadwaita-1-dev libdistinst-dev libgee-0.8-dev libgranite-7-dev libgtk-4-dev libxkbregistry-dev libjson-glib-dev libpwquality-dev meson valac
apt install -y desktop-file-utils gettext libadwaita-1-dev libdistinst-dev libgee-0.8-dev libgranite-7-dev libgtk-4-dev libxkbregistry-dev libjson-glib-dev libpantheon-wayland-1-dev libpwquality-dev meson valac
- name: Build and Test
env:
DESTDIR: out
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ You'll need the following dependencies:
- libgee-0.8-dev
- libadwaita-1-dev >=1.4.0
- libjson-glib-dev
- libpantheon-wayland-1-dev
- libpwquality-dev
- libxkbregistry-dev
- [distinst](https://github.com/pop-os/distinst/)
Expand Down
12 changes: 12 additions & 0 deletions data/installer.metainfo.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,18 @@
<update_contact>contact_at_elementary.io</update_contact>

<releases>
<release version="8.1.1" date="2024-10-23" urgency="medium">
<description>
<p>Improvements:</p>
<ul>
<li>Updated translations</li>
</ul>
</description>
<issues>
<issue url="https://github.com/elementary/installer/issues/758">Installer UI is not centered</issue>
</issues>
</release>

<release version="8.1.0" date="2024-10-21" urgency="medium">
<description>
<p>Improvements:</p>
Expand Down
1 change: 1 addition & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ adw_dep = dependency('libadwaita-1', version: '>=1.4.0')
json_glib_dep = dependency('json-glib-1.0')
xkbregistry_dep = dependency('xkbregistry')
pwquality_dep = dependency('pwquality')
pantheon_wayland_dep = dependency('pantheon-wayland-1')
systemd_dep = dependency('systemd')

installer_backend = get_option('installer_backend')
Expand Down
7 changes: 6 additions & 1 deletion src/MainWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public interface UPower : GLib.Object {
public abstract bool on_battery { owned get; set; }
}

public class Installer.MainWindow : Gtk.ApplicationWindow {
public class Installer.MainWindow : Gtk.ApplicationWindow, PantheonWayland.ExtendedBehavior {
// We have to do it step by step because the vala compiler has overflows with big numbers.
private const uint64 ONE_GB = 1000 * 1000 * 1000;
// Minimum 15 GB
Expand Down Expand Up @@ -87,6 +87,11 @@ public class Installer.MainWindow : Gtk.ApplicationWindow {

return Source.REMOVE;
});

child.realize.connect (() => {
connect_to_shell ();
make_centered ();
});
}

private void load_keyboard_view () {
Expand Down
1 change: 1 addition & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ gui_dependencies = [
gtk_dep,
adw_dep,
json_glib_dep,
pantheon_wayland_dep,
pwquality_dep,
xkbregistry_dep
]
Expand Down

0 comments on commit a19982a

Please sign in to comment.