summaryrefslogtreecommitdiff
path: root/src/resources/ui/nautilus-progress-indicator.blp
blob: 7ca12af89df25fff8af07036e0412dbf6594dce3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
using Gtk 4.0;
using Adw 1;

template $NautilusProgressIndicator: Adw.Bin {
  hexpand: true;

  child: MenuButton operations_button {
    tooltip-text: _("Show File Operations");
    direction: right;

    popover: Popover operations_popover {
      position: bind template.popover-position;

      child: ScrolledWindow {
        hscrollbar-policy: never;
        max-content-height: 270;
        propagate-natural-height: true;

        child: ListBox operations_list {
          margin-start: 6;
          margin-end: 6;
          margin-top: 6;
          margin-bottom: 6;
          selection-mode: none;
          activate-on-single-click: false;

          styles [
            "operations-list",
          ]
        };
      };

      notify::visible => $on_operations_popover_notify_visible(template);
    };

    styles [
      "flat",
    ]

    child: ListView sidebar_list {
      valign: center;

      factory: BuilderListItemFactory {
        template ListItem {
          activatable: false;
          focusable: false;
          selectable: false;

          child: Box {
            spacing: 9;

            Image progress_icon {
              pixel-size: 14;
              margin-start: 3;
              paintable: bind $get_paintable(template.item) as <$GdkPaintable>;
            }

            Label {
              ellipsize: end;
              label: bind template.item as <$NautilusProgressInfo>.short-status;
            }
          };
        }
      };
    };
  };

  styles [
    "nautilus-progress-indicator",
  ]
}