aboutsummaryrefslogtreecommitdiff
path: root/vendor/libghostty-vt/src/apprt/gtk/ui/1.2/key-state-overlay.blp
blob: c8654bfbbba6e175e9959802ad8d0a08389bee64 (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
using Gtk 4.0;
using Adw 1;

template $GhosttyKeyStateOverlay: Adw.Bin {
  visible: bind $has_state(template.has-tables, template.has-sequence) as <bool>;
  valign-target: end;
  halign: center;
  valign: bind template.valign-target;

  GestureDrag {
    button: 1;
    propagation-phase: capture;
    drag-end => $on_drag_end();
  }

  Adw.Bin {
    Box container {
      styles [
        "background",
        "key-state-overlay",
      ]

      orientation: horizontal;
      spacing: 6;

      Image {
        icon-name: "input-keyboard-symbolic";
        pixel-size: 16;
      }

      Label tables_label {
        visible: bind template.has-tables;
        label: bind $tables_text(template.tables) as <string>;
        xalign: 0.0;
      }

      Label chevron_label {
        visible: bind $show_chevron(template.has-tables, template.has-sequence) as <bool>;
        label: "›";

        styles [
          "dim-label",
        ]
      }

      Label sequence_label {
        visible: bind template.has-sequence;
        label: bind $sequence_text(template.sequence) as <string>;
        xalign: 0.0;
      }

      Spinner pending_spinner {
        visible: bind template.has-sequence;
        spinning: bind template.has-sequence;
      }
    }
  }
}