From 94e2849d36dd30bd446baf3d1c3dbf8f1b7919d9 Mon Sep 17 00:00:00 2001 From: Alexander Vanhee <160625516+AlexanderVanhee@users.noreply.github.com> Date: Mon, 25 May 2026 10:59:32 +0200 Subject: [PATCH] Bring back the danger style for desktop only apps on mobile widths I was asked to remove the icon change based on width of the full view, but accidentally also removed the style changing aswell --- src/bz-full-view.blp | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/src/bz-full-view.blp b/src/bz-full-view.blp index 109b6a72..6568bb39 100644 --- a/src/bz-full-view.blp +++ b/src/bz-full-view.blp @@ -53,6 +53,8 @@ template $BzFullView: Adw.Bin { context_bar.homogeneous: false; header_box.spacing: 12; app_name_box.spacing: 0; + formfactor_support_tile_wide.visible: false; + formfactor_support_tile_narrow.visible: true; screenshots.compact: true; header_bar.show-title: false; } @@ -336,7 +338,7 @@ template $BzFullView: Adw.Bin { Box { homogeneous: true; - $BzContextTile { + $BzContextTile formfactor_support_tile_wide { label: bind $get_formfactor_label(template.ui-entry as <$BzResult>.object as <$BzEntry>.is-mobile-friendly) as ; has-tooltip: true; tooltip-text: bind $get_formfactor_tooltip(template.ui-entry as <$BzResult>.object as <$BzEntry>.is-mobile-friendly) as ; @@ -361,6 +363,32 @@ template $BzFullView: Adw.Bin { }; } + $BzContextTile formfactor_support_tile_narrow { + label: bind $get_formfactor_label(template.ui-entry as <$BzResult>.object as <$BzEntry>.is-mobile-friendly) as ; + has-tooltip: true; + tooltip-text: bind $get_formfactor_tooltip(template.ui-entry as <$BzResult>.object as <$BzEntry>.is-mobile-friendly) as ; + clicked => $formfactor_cb(template); + lozenge-style: bind $bool_to_string(template.ui-entry as <$BzResult>.object as <$BzEntry>.is-mobile-friendly, "grey", "error") as ; + visible: false; + + lozenge-child: Box { + Image { + visible: bind template.ui-entry as <$BzResult>.object as <$BzEntry>.is-mobile-friendly as ; + icon-name: "device-support-adaptive-symbolic"; + pixel-size: 56; + + styles [ + "wide-image", + ] + } + + Image { + visible: bind $invert_boolean(template.ui-entry as <$BzResult>.object as <$BzEntry>.is-mobile-friendly) as ; + icon-name: "device-support-desktop-symbolic"; + } + }; + } + $BzContextTile { clicked => $age_rating_cb(template); has-tooltip: true;