gui/blueprint: Drop unneeded casts to built-ins
Blueprint can now "infer" the type a closure returns, as long as it is not the property of a custom GType, so some of the casts (e.g. `as <string>`) will not be necessary anymore Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/733>
This commit is contained in:
@@ -3,7 +3,7 @@ using Adw 1;
|
|||||||
|
|
||||||
template $GcalOrganizerRow: Adw.ActionRow {
|
template $GcalOrganizerRow: Adw.ActionRow {
|
||||||
title: _("Organizer");
|
title: _("Organizer");
|
||||||
subtitle: bind $generate_subtitle(template.organizer) as <string>;
|
subtitle: bind $generate_subtitle(template.organizer);
|
||||||
|
|
||||||
styles [
|
styles [
|
||||||
"property",
|
"property",
|
||||||
|
|||||||
@@ -132,12 +132,12 @@ Popover popover {
|
|||||||
ellipsize: end;
|
ellipsize: end;
|
||||||
xalign: 0.0;
|
xalign: 0.0;
|
||||||
max-width-chars: 40;
|
max-width-chars: 40;
|
||||||
label: bind $escape_markup_cb(template.item as <$GcalSearchHit>.title) as <string>;
|
label: bind $escape_markup_cb(template.item as <$GcalSearchHit>.title);
|
||||||
}
|
}
|
||||||
|
|
||||||
Label separator {
|
Label separator {
|
||||||
label: "—";
|
label: "—";
|
||||||
visible: bind $string_is_not_empty_cb(template.item as <$GcalSearchHit>.subtitle) as <bool>;
|
visible: bind $string_is_not_empty_cb(template.item as <$GcalSearchHit>.subtitle);
|
||||||
|
|
||||||
styles [
|
styles [
|
||||||
"dimmed",
|
"dimmed",
|
||||||
@@ -149,7 +149,7 @@ Popover popover {
|
|||||||
use-markup: true;
|
use-markup: true;
|
||||||
ellipsize: end;
|
ellipsize: end;
|
||||||
xalign: 0.0;
|
xalign: 0.0;
|
||||||
label: bind $escape_markup_cb(template.item as <$GcalSearchHit>.subtitle) as <string>;
|
label: bind $escape_markup_cb(template.item as <$GcalSearchHit>.subtitle);
|
||||||
|
|
||||||
styles [
|
styles [
|
||||||
"subtitle",
|
"subtitle",
|
||||||
|
|||||||
@@ -266,15 +266,15 @@ template $GcalWindow: Adw.ApplicationWindow {
|
|||||||
ActionBar {
|
ActionBar {
|
||||||
[start]
|
[start]
|
||||||
Button previous_date_button {
|
Button previous_date_button {
|
||||||
icon-name: bind $get_previous_date_icon(views_stack.visible-child) as <string>;
|
icon-name: bind $get_previous_date_icon(views_stack.visible-child);
|
||||||
tooltip-text: bind $get_previous_date_tooltip(views_stack.visible-child-name) as <string>;
|
tooltip-text: bind $get_previous_date_tooltip(views_stack.visible-child-name);
|
||||||
action-name: "win.previous-date";
|
action-name: "win.previous-date";
|
||||||
}
|
}
|
||||||
|
|
||||||
[start]
|
[start]
|
||||||
Button next_date_button {
|
Button next_date_button {
|
||||||
icon-name: bind $get_next_date_icon(views_stack.visible-child) as <string>;
|
icon-name: bind $get_next_date_icon(views_stack.visible-child);
|
||||||
tooltip-text: bind $get_next_date_tooltip(views_stack.visible-child-name) as <string>;
|
tooltip-text: bind $get_next_date_tooltip(views_stack.visible-child-name);
|
||||||
action-name: "win.next-date";
|
action-name: "win.next-date";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ template $GcalWeekView: Box {
|
|||||||
ToggleButton {
|
ToggleButton {
|
||||||
visible: bind header.can-expand;
|
visible: bind header.can-expand;
|
||||||
active: bind header.expanded bidirectional;
|
active: bind header.expanded bidirectional;
|
||||||
tooltip-text: bind $get_header_state_tooltip(header.expanded) as <string>;
|
tooltip-text: bind $get_header_state_tooltip(header.expanded);
|
||||||
hexpand: true;
|
hexpand: true;
|
||||||
halign: center;
|
halign: center;
|
||||||
valign: end;
|
valign: end;
|
||||||
|
|||||||
Reference in New Issue
Block a user