Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

ui: split TextButtonSmall padX into separate left/right padding

Left padding stays at 2, right padding reduced to 1.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+6 -5
+6 -5
system/public/aesthetic.computer/lib/ui.mjs
··· 1030 1030 // MatrixChunky8: 4px char width, 7px char height 1031 1031 #cw = 4; 1032 1032 #ch = 7; 1033 - #padX = 1; // Horizontal padding 1033 + #padL = 2; // Left padding 1034 + #padR = 1; // Right padding 1034 1035 #padY = 2; // Vertical padding 1035 1036 #offset; 1036 - 1037 + 1037 1038 constructor(text = "Button", pos = { x: 0, y: 0 }) { 1038 1039 this.txt = text; 1039 - this.#offset = { x: this.#padX, y: this.#padY }; 1040 + this.#offset = { x: this.#padL, y: this.#padY }; 1040 1041 this.btn = new Button(this.#computePosition(text, { ...pos })); 1041 1042 } 1042 1043 ··· 1070 1071 1071 1072 get width() { 1072 1073 const visibleText = stripColorCodes(this.txt); 1073 - return visibleText.length * this.#cw + this.#padX * 2; 1074 + return visibleText.length * this.#cw + this.#padL + this.#padR; 1074 1075 } 1075 1076 1076 1077 get height() { ··· 1079 1080 1080 1081 #computePosition(text, pos = { x: 0, y: 0 }) { 1081 1082 const visibleText = stripColorCodes(text); 1082 - const w = visibleText.length * this.#cw + this.#padX * 2; 1083 + const w = visibleText.length * this.#cw + this.#padL + this.#padR; 1083 1084 const h = this.#ch + this.#padY * 2; 1084 1085 1085 1086 let x = pos.x || 0;