Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion src/Library/Library.blp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ using Adw 1;

Adw.PreferencesWindow library {
hide-on-close: true;
modal: true;
modal: false;
title: _("Library");
default-height: 700;
default-width: 700;
Expand Down
9 changes: 5 additions & 4 deletions src/Library/Library.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@ const demo_dir = Gio.File.new_for_path(

export default function Library({
openDemo,
window: appliation_window,
window: application_window,
application,
}) {
const builder = Gtk.Builder.new_from_resource(resource);
const window = builder.get_object("library");
window.set_transient_for(appliation_window);

let last_selected;

Expand All @@ -38,7 +37,9 @@ export default function Library({
widget.connect("activated", () => {
last_selected = widget;
openDemo(demo.name)
.then(() => window.close())
.then(() => {
application_window.present();
})
.catch(logError);
});

Expand All @@ -53,7 +54,7 @@ export default function Library({
window.present();
last_selected?.grab_focus();
});
appliation_window.add_action(action_library);
application_window.add_action(action_library);
application.set_accels_for_action("win.library", ["<Control><Shift>O"]);
}

Expand Down
3 changes: 1 addition & 2 deletions src/Previewer/Internal.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Gtk from "gi://Gtk";
import Gdk from "gi://Gdk";
import * as postcss from "../lib/postcss.js";
import GLib from "gi://GLib";
import Graphene from "gi://Graphene";
Expand Down Expand Up @@ -50,7 +49,7 @@ export default function Internal({
}
}

object_root.present_with_time(Gdk.CURRENT_TIME);
object_root.present();
onWindowChange(true);
}

Expand Down