changed channel and log views to use `ListView` (looks much cleaner)

CrepeGoat
Oct 9, 2024, 8:35 PM
HZV5P57YJPTWI34HC5KDGZNOREGME2PBKT3W24DSYFE72UAAYRJQC

Dependencies

  • [2] XERTHGSY consolidated `pijul log` UI elements into their own component
  • [3] G2CHQAOP parsed `pijul log` text blob into individual entries & fields
  • [4] NSE6BLWA init slint project from https://github.com/slint-ui/slint-rust-template
  • [5] 6ECOC7L5 parsed `pijul channel` text blob into individual UI components
  • [6] IQY5LHEN add GUI element to display simple `pijul log` results

Change contents

  • replacement in ui/app-window.slint at line 1
    [3.57][3.0:94]()
    import { Button, VerticalBox, HorizontalBox, ScrollView, ListView } from "std-widgets.slint";
    [3.57]
    [3.0]
    import { Button, VerticalBox, HorizontalBox, ScrollView, ListView, StandardListView } from "std-widgets.slint";
  • replacement in ui/app-window.slint at line 53
    [2.110][2.110:318]()
    // TODO convert to a (Standard)ListView?
    ScrollView {
    preferred-width: 500px;
    VerticalBox {
    alignment: start;
    Text {
    text: "log";
    }
    [2.110]
    [2.318]
    VerticalBox {
    Text {
    vertical-stretch: 0;
    text: "log";
    }
  • edit in ui/app-window.slint at line 59
    [2.319]
    [2.319]
    // TODO convert to a StandardListView?
    ListView {
    preferred-width: 500px;
  • edit in ui/app-window.slint at line 77
    [3.215][3.215:261]()
    alignment: start;
    spacing: 0;
  • edit in ui/app-window.slint at line 80
    [3.309]
    [3.309]
    vertical-stretch: 0;
  • replacement in ui/app-window.slint at line 84
    [3.350][3.350:528]()
    // TODO convert to a (Standard)ListView?
    for ch[index] in channels: HorizontalBox {
    alignment: start;
    spacing: 0;
    padding: 0;
    [3.350]
    [3.528]
    // TODO convert to a StandardListView?
    ListView {
    for ch[index] in channels: HorizontalBox {
    alignment: start;
    spacing: 0;
    padding: 0;
  • replacement in ui/app-window.slint at line 91
    [3.529][3.529:707]()
    Rectangle {
    width: 10px;
    height: 10px;
    visible: index == root.active;
    background: blue;
    }
    [3.529]
    [3.707]
    Rectangle {
    width: 10px;
    height: 10px;
    visible: index == root.active;
    background: blue;
    }
  • replacement in ui/app-window.slint at line 98
    [3.708][3.708:758]()
    Text {
    text: "\{ch}";
    [3.708]
    [3.758]
    Text {
    text: "\{ch}";
    }