split channel labels into discrete component

CrepeGoat
Oct 10, 2024, 5:53 PM
ZGSCV5DIGFYUM6DUSPHZF5EOHOF63K4EMCWEPA45T7PBFSDMIBYQC

Dependencies

  • [2] HZV5P57Y changed channel and log views to use `ListView` (looks much cleaner)
  • [3] 6ECOC7L5 parsed `pijul channel` text blob into individual UI components
  • [*] NSE6BLWA init slint project from https://github.com/slint-ui/slint-rust-template
  • [*] G2CHQAOP parsed `pijul log` text blob into individual entries & fields

Change contents

  • edit in ui/app-window.slint at line 88
    [6.872]
    [6.872]
    }
    }
    }
    component ChannelEntry inherits Rectangle {
    in property <string> name;
    in property <bool> active;
    HorizontalBox {
    alignment: start;
    spacing: 0;
    padding: 0;
    Rectangle {
    width: 10px;
    height: 100%;
    visible: root.active;
    background: blue;
    }
    Text {
    text: "\{name}";
  • replacement in ui/app-window.slint at line 126
    [2.418][2.418:563](),[2.563][3.528:529](),[3.528][3.528:529](),[3.529][2.564:766](),[2.766][3.707:708](),[3.707][3.707:708](),[3.708][2.767:843]()
    for ch[index] in channels: HorizontalBox {
    alignment: start;
    spacing: 0;
    padding: 0;
    Rectangle {
    width: 10px;
    height: 10px;
    visible: index == root.active;
    background: blue;
    }
    Text {
    text: "\{ch}";
    }
    [2.418]
    [3.758]
    for ch[index] in channels: ChannelEntry {
    name: ch;
    active: active == index;