Merge branch 'addon-size-fix' into 'main'
Fix addons dialog See merge request World/bazaar!1998
This commit is contained in:
commit
89d4320ba7
1 changed files with 34 additions and 16 deletions
|
|
@ -159,23 +159,41 @@ template $BzAddonsDialog: Adw.Dialog {
|
|||
|
||||
styles ["app-context-bar"]
|
||||
|
||||
$BzContextTile {
|
||||
label: bind $get_size_label($is_zero(template.selected-group as <$BzEntryGroup>.removable) as <bool>) as <string>;
|
||||
clicked => $size_cb(template);
|
||||
tooltip-text: bind $format_size_tooltip(template.selected-ui-entry as <$BzResult>.object as <$BzEntry>.size) as <string>;
|
||||
lozenge-style: "grey";
|
||||
sensitive: bind $invert_boolean($is_zero($get_size_type(template.selected-ui-entry as <$BzResult>.object as <$BzEntry>, $is_zero(template.selected-group as <$BzEntryGroup>.removable) as <bool>) as <uint64>) as <bool>) as <bool>;
|
||||
Stack size_tile_stack {
|
||||
visible-child-name: bind $get_size_tile_child_name(template.selected-group as <$BzEntryGroup>.removable) as <string>;
|
||||
transition-type: crossfade;
|
||||
|
||||
lozenge-child: Label {
|
||||
justify: center;
|
||||
label: bind $format_size($get_size_type(template.selected-ui-entry as <$BzResult>.object as <$BzEntry>, $is_zero(template.selected-group as <$BzEntryGroup>.removable) as <bool>) as <uint64>) as <string>;
|
||||
lines: 3;
|
||||
ellipsize: end;
|
||||
halign: center;
|
||||
wrap: true;
|
||||
xalign: 0.5;
|
||||
use-markup: true;
|
||||
};
|
||||
StackPage {
|
||||
name: "download";
|
||||
child: $BzContextTile download_size_tile {
|
||||
label: bind try {$get_download_size_label(
|
||||
template.selected-group as <$BzEntryGroup>.ui-entry as <$BzResult>.object as <$BzFlatpakEntry>.runtime as <$BzResult>.object as <$BzEntry>.installed,
|
||||
template.selected-group as <$BzEntryGroup>.ui-entry as <$BzResult>.object as <$BzFlatpakEntry>.runtime as <$BzResult>.object as <$BzEntry>.size,
|
||||
) as <string>, _("Download")};
|
||||
tooltip-text: bind $format_download_size_tooltip(template.selected-ui-entry as <$BzResult>.object as <$BzEntry>.size) as <string>;
|
||||
lozenge-style: "grey";
|
||||
clicked => $size_cb(template);
|
||||
|
||||
lozenge-child: Label {
|
||||
label: bind $format_size(template.selected-ui-entry as <$BzResult>.object as <$BzEntry>.size) as <string>;
|
||||
use-markup: true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
StackPage {
|
||||
name: "installed";
|
||||
child: $BzContextTile installed_size_tile {
|
||||
label: _("Installed");
|
||||
tooltip-text: bind $format_installed_size_tooltip(template.selected-ui-entry as <$BzResult>.object as <$BzEntry>.installed-size) as <string>;
|
||||
lozenge-style: "grey";
|
||||
clicked => $size_cb(template);
|
||||
lozenge-child: Label {
|
||||
label: bind $format_size(template.selected-ui-entry as <$BzResult>.object as <$BzEntry>.installed-size) as <string>;
|
||||
use-markup: true;
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
$BzContextTile {
|
||||
|
|
|
|||
Loading…
Reference in a new issue