rework text content in `ChangeEntry`

CrepeGoat
Oct 17, 2024, 6:09 AM
6T56ZFQKD73KAAXJIX7U3AR4AJMSKZEZKNXKLUKHSSZMG3LXSEPAC

Dependencies

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

Change contents

  • edit in ui/app-window.slint at line 67
    [2.309]
    [3.346]
    // Each text element is given default text, in case it's empty
    // 1) it looks nicer
    // 2) it makes empty entries the same height as filled entries
    // -> uniform-height entries are more performant in a ListView
  • replacement in ui/app-window.slint at line 72
    [3.364][3.364:517]()
    spacing: 0;
    Text {
    text: "hash \{root.hash}";
    }
    Text {
    text: "author \{root.author}";
    }
    [3.364]
    [3.115]
    spacing: 5px;
  • replacement in ui/app-window.slint at line 74
    [3.116][3.518:582]()
    Text {
    text: "timestamp \{root.timestamp}";
    [3.116]
    [3.582]
    msg-text := Text {
    text: message == "" ? "(no message)" : "\{root.message}";
    overflow: elide;
    font-italic: message == "";
  • edit in ui/app-window.slint at line 79
    [3.592][3.592:697](),[3.697][3.697:698](),[3.698][3.698:797]()
    HorizontalBox {
    alignment: start;
    spacing: 0;
    padding: 5px;
    Rectangle {
    width: 10px;
    visible: false;
    }
  • replacement in ui/app-window.slint at line 80
    [3.798][3.798:858](),[3.858][3.2:16]()
    Text {
    text: "\{root.message}";
    }
    [3.798]
    [3.16]
    author-text := Text {
    text: author == "" ? "(no author)" : "\{root.author}";
    overflow: elide;
    font-italic: true;
  • edit in ui/app-window.slint at line 92
    [2.420]
    [2.420]
    msg-text.color: Palette.selection-foreground;
    author-text.color: Palette.selection-foreground;
  • edit in ui/app-window.slint at line 97
    [2.548]
    [2.548]
    msg-text.color: Palette.alternate-foreground;
    author-text.color: Palette.alternate-foreground;