Skip to content

Commit

Permalink
Merge pull request #689 from mjakeman/gnome-47
Browse files Browse the repository at this point in the history
GNOME 47
  • Loading branch information
oscfdezdz authored Oct 25, 2024
2 parents c82ed2f + 70a3d42 commit a463aca
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 64 deletions.
8 changes: 5 additions & 3 deletions build-aux/com.mattjakeman.ExtensionManager.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id" : "com.mattjakeman.ExtensionManager",
"runtime" : "org.gnome.Platform",
"runtime-version" : "46",
"runtime-version" : "47",
"sdk" : "org.gnome.Sdk",
"command" : "extension-manager",
"finish-args" : [
Expand Down Expand Up @@ -57,12 +57,14 @@
"name" : "text-engine",
"builddir" : true,
"buildsystem" : "meson",
"config-opts" : [
"--libdir=/app/lib"
],
"sources" : [
{
"type" : "git",
"url" : "https://github.com/mjakeman/text-engine.git",
"commit" : "379437b2b589a9414985dec9136b7b48bae76f9e",
"tag" : "v0.1.0"
"branch" : "master"
}
]
},
Expand Down
23 changes: 14 additions & 9 deletions src/exm-browse-page.blp
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,9 @@ template $ExmBrowsePage: Gtk.Widget {
Gtk.StackPage {
name: "page_spinner";

child: Gtk.Spinner {
child: Adw.Spinner {
valign: center;
halign: center;
spinning: true;
height-request: 32;
width-request: 32;
};
Expand All @@ -70,22 +69,28 @@ template $ExmBrowsePage: Gtk.Widget {

child: Gtk.Box {
orientation: vertical;
spacing: 12;

Gtk.ListBox search_results {
styles [
"boxed-list"
]

valign: start;
selection-mode: none;
}

Gtk.Button more_results_btn {
label: _("_Load More Results");
halign: center;
margin-top: 24;
use-underline: true;
clicked => $on_load_more_results();
Gtk.ListBox more_results_list {
styles [
"boxed-list"
]

selection-mode: none;

Adw.ButtonRow more_results_btn {
title: _("_Load More Results");
use-underline: true;
activated => $on_load_more_results();
}
}
};
}
Expand Down
8 changes: 5 additions & 3 deletions src/exm-browse-page.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ struct _ExmBrowsePage
GtkListBox *search_results;
GtkStack *search_stack;
GtkDropDown *search_dropdown;
GtkButton *more_results_btn;
GtkListBox *more_results_list;
AdwButtonRow *more_results_btn;
};

G_DEFINE_FINAL_TYPE (ExmBrowsePage, exm_browse_page, GTK_TYPE_WIDGET)
Expand Down Expand Up @@ -146,7 +147,7 @@ static void
update_load_more_btn (ExmBrowsePage *self)
{
// Hide button if we are the last page
gtk_widget_set_visible (GTK_WIDGET (self->more_results_btn), self->current_page != self->max_pages);
gtk_widget_set_visible (GTK_WIDGET (self->more_results_list), self->current_page != self->max_pages);

// Make it clickable
gtk_widget_set_sensitive (GTK_WIDGET (self->more_results_btn), TRUE);
Expand Down Expand Up @@ -231,7 +232,7 @@ on_next_page_result (GObject *source,
}

static void
on_load_more_results (GtkButton *btn,
on_load_more_results (AdwButtonRow *row,
ExmBrowsePage *self)
{
const char *query;
Expand Down Expand Up @@ -390,6 +391,7 @@ exm_browse_page_class_init (ExmBrowsePageClass *klass)
gtk_widget_class_bind_template_child (widget_class, ExmBrowsePage, search_results);
gtk_widget_class_bind_template_child (widget_class, ExmBrowsePage, search_stack);
gtk_widget_class_bind_template_child (widget_class, ExmBrowsePage, search_dropdown);
gtk_widget_class_bind_template_child (widget_class, ExmBrowsePage, more_results_list);
gtk_widget_class_bind_template_child (widget_class, ExmBrowsePage, more_results_btn);

gtk_widget_class_bind_template_callback (widget_class, on_search_entry_realize);
Expand Down
26 changes: 18 additions & 8 deletions src/exm-comment-dialog.blp
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
using Gtk 4.0;
using Adw 1;

template $ExmCommentDialog : Adw.Dialog {
template $ExmCommentDialog: Adw.Dialog {
content-width: 600;
content-height: 600;
width-request: 360;
height-request: 294;
title: _("Comments");

child: Adw.ToolbarView {

[top]
Adw.HeaderBar {}

Expand All @@ -26,15 +25,19 @@ template $ExmCommentDialog : Adw.Dialog {
spacing: 12;
valign: center;

Gtk.Spinner {
spinning: true;
Adw.Spinner {
halign: center;
valign: center;
height-request: 32;
width-request: 32;
}

Gtk.Label {
styles["title-2"]
label: _("Loading Comments");
styles [
"title-2"
]

label: _("Loading Comments");
}
};
}
Expand All @@ -43,7 +46,10 @@ template $ExmCommentDialog : Adw.Dialog {
name: "page_error";

child: Adw.StatusPage {
styles ["content"]
styles [
"content"
]

title: _("An Error Occurred");
icon-name: "dialog-question-symbolic";
};
Expand All @@ -53,7 +59,11 @@ template $ExmCommentDialog : Adw.Dialog {
name: "page_comments";

child: Gtk.ListBox list_box {
styles ["content", "boxed-list"]
styles [
"content",
"boxed-list"
]

valign: start;
selection-mode: none;
};
Expand Down
5 changes: 3 additions & 2 deletions src/exm-detail-view.blp
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ template $ExmDetailView: Adw.NavigationPage {
spacing: 24;
valign: center;

Gtk.Spinner {
spinning: true;
Adw.Spinner {
focusable: true;
halign: center;
valign: center;
height-request: 32;
width-request: 32;

Expand Down
5 changes: 3 additions & 2 deletions src/exm-upgrade-assistant.blp
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,10 @@ template $ExmUpgradeAssistant: Adw.Dialog {
spacing: 12;
valign: center;

Gtk.Spinner {
spinning: true;
Adw.Spinner {
focusable: true;
halign: center;
valign: center;
height-request: 32;
width-request: 32;
}
Expand Down
1 change: 1 addition & 0 deletions src/exm-window.blp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ Adw.AlertDialog unsupported_dialog {
body: _("This extension does not support your GNOME Shell version. It may cause errors if installed.");
default-response: "back";
close-response: "back";
prefer-wide-layout: true;

responses [
install: _("_Install Anyway") destructive,
Expand Down
52 changes: 15 additions & 37 deletions src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

.tint {
/* Dark view_bg_color */
background-color: rgba(30, 30, 30, 1);
background-color: rgb(30 30 30);
color: white;
}

Expand All @@ -38,7 +38,7 @@
}

rating {
color: @yellow_4;
color: var(--yellow-4);
}

.info-bar.horizontal > :not(:first-child),
Expand All @@ -62,50 +62,28 @@ rating {
}

.author-badge {
background-color: @blue_3;
border-radius: 999px;
color: @white_1;
margin-left: 6px;
padding: 2px 6px;
background-color: var(--accent-color);
border-radius: 999px;
color: var(--window-bg-color);
margin-left: 6px;
padding: 2px 6px;
}

/* Progress Bar Colours */
progressbar.error progress {
background-color: @red_1;
}

progressbar.error text {
color: @red_1;
opacity: 0.8;
}

progressbar.warning progress {
background-color: @yellow_4;
}

progressbar.warning text {
color: @window_fg_color;
}

progressbar.success progress {
background-color: @green_1;
}

progressbar.success text {
color: @green_1;
opacity: 0.8;
progressbar text {
font-size: 14px;
font-weight: bold;
}

/* Workaround for https://gitlab.gnome.org/GNOME/gtk/-/issues/5309 */
.boxed-list-placeholder > row:nth-last-child(2),
.boxed-list-placeholder > row.expander:nth-last-child(2):not(:checked) > box > list > row.header,
.boxed-list-placeholder > row.expander:nth-last-child(2) > box > revealer > list.nested > row:last-child {
border-bottom: 0;
border-bottom-left-radius: 12px;
border-bottom-right-radius: 12px;
border-bottom: 0;
border-bottom-left-radius: 12px;
border-bottom-right-radius: 12px;
}

.boxed-list-placeholder > row.expander:nth-last-child(2) > box > revealer > list.nested {
border-bottom-left-radius: 12px;
border-bottom-right-radius: 12px;
border-bottom-left-radius: 12px;
border-bottom-right-radius: 12px;
}

0 comments on commit a463aca

Please sign in to comment.