Trying to get the display in a different way

This commit is contained in:
sergiotarxz 2022-07-01 03:12:43 +02:00
parent e1792dffeb
commit ef7929a469
1 changed files with 2 additions and 4 deletions

View File

@ -41,9 +41,6 @@ void main () {
psoe_image = preloaded_images_path + S + "psoe.jpg";
pp_image = preloaded_images_path + S + "pp.jpg";
vox_image = preloaded_images_path + S + "vox.jpg";
if (S == "\\") {
app.set_resource_base_path ("share");
}
app.activate.connect ( () => {
activate (app);
});
@ -58,7 +55,8 @@ void activate (Adw.Application app) {
var window_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0);
var parties_container = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 2);
if (S == "\\") {
var icon_theme = Gtk.IconTheme.get_for_display (app_window.get_display ());
var display = Gdk.Display.get_default ();
var icon_theme = Gtk.IconTheme.get_for_display (display);
icon_theme.add_search_path (@"share\\icons");
}
parties_container.margin_bottom = 50;