diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-18 11:14:08 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-18 11:14:08 +0200 |
| commit | 02c3277356271bc9f2969cd56ee654e95ef9ce9e (patch) | |
| tree | 1ee3987fceae93e542d970f0e7e041f5dbdc9cca /rofi/udt/screenshot.rasi | |
| parent | 284709aefaed47b8d519ecf6c3dc79d1cd5cbbdf (diff) | |
| download | unified-desktop-theme-02c3277356271bc9f2969cd56ee654e95ef9ce9e.tar.gz unified-desktop-theme-02c3277356271bc9f2969cd56ee654e95ef9ce9e.zip | |
fix(rofi): compact confirm and screenshot cards, centre glyphs
The confirm and screenshot menus split the monitor into two half-screen
buttons with a glyph sized from the monitor height. They are now a fixed
368px card centred on the scrim, two 150px buttons at 72pt, so the
scripts no longer compute a glyph size.
Glyphs in all three menus sat right of centre: common.rasi's element
spacing still reserved a gap for the hidden icon. Elements now hold
element-text only. The power menu's greeting ignored horizontal-align,
so spacers either side centre it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'rofi/udt/screenshot.rasi')
| -rw-r--r-- | rofi/udt/screenshot.rasi | 52 |
1 files changed, 39 insertions, 13 deletions
diff --git a/rofi/udt/screenshot.rasi b/rofi/udt/screenshot.rasi index 0eff248..8748628 100644 --- a/rofi/udt/screenshot.rasi +++ b/rofi/udt/screenshot.rasi @@ -1,12 +1,10 @@ /* - * udt screenshot layout: two fullscreen buttons, whole screen or area. + * udt screenshot layout: a compact two-button card, whole screen or area. * Copyright (C) 2026 Danilo M. <danix@danix.xyz> * Licensed under the GNU General Public License v2 only. * - * Each option takes half the monitor, so the choice is one glance and one - * click. Cells fill whatever monitor rofi opens on; the glyph size cannot be - * a percentage in rofi, so the script passes it with -theme-str, derived from - * the focused monitor's height. The font below is only the fallback. + * The window stays fullscreen for the scrim; the buttons sit on a fixed-size + * card centred on it, so they read the same on every monitor. */ @import "common.rasi" @@ -17,13 +15,37 @@ window { background-color: @scrim; border: 0; border-radius: 0; - padding: 6%; + padding: 0; } -/* rofi sizes a row by its text, not by the space left, so spacers above and - * below centre the row instead of leaving it pinned to the top edge. */ +/* rofi has no centring property, so spacers on both axes hold the card in + * the middle: mainbox centres a column horizontally, column centres the card + * vertically. */ mainbox { - children: [ dummy, listview, dummy ]; + orientation: horizontal; + children: [ dummy, column, dummy ]; +} + +/* A horizontal box sizes children by their own width, and listview reports + * none, so the card's width is spelled out: two 150px buttons, 16px apart, + * plus 24px padding and 2px border each side. */ +column { + expand: false; + width: 368px; + orientation: vertical; + children: [ dummy, card, dummy ]; +} + +card { + expand: false; + orientation: vertical; + children: [ listview ]; + spacing: 20px; + padding: 24px; + background-color: @base; + border: 2px; + border-color: @accent; + border-radius: 18px; } dummy { @@ -37,17 +59,21 @@ listview { fixed-height: true; fixed-columns: true; flow: horizontal; - spacing: 4%; + spacing: 16px; } +/* Text only: common.rasi's element spacing still reserves a gap for the + * icon, which pushed the glyph off centre. */ element { - padding: 80px 0px; - border-radius: 24px; + children: [ element-text ]; + width: 150px; + padding: 28px 0px; + border-radius: 12px; background-color: @surface0; } element-text { - font: "Inconsolata Nerd Font Mono 160"; + font: "Inconsolata Nerd Font Mono 72"; horizontal-align: 0.5; vertical-align: 0.5; text-color: inherit; |
