@gjsify/adwaita-nativescript 0.64.13 → 0.64.15-next.287
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/builder/index.js +1 -1
- package/lib/esm/index.js +1 -1
- package/lib/esm/name-selector.js +1 -0
- package/lib/esm/namespace/gio.js +1 -1
- package/lib/esm/namespace/gtk.js +1 -1
- package/lib/esm/platform-host.js +1 -1
- package/lib/esm/widgets/adw-about-dialog.js +3 -3
- package/lib/esm/widgets/adw-action-row.js +1 -1
- package/lib/esm/widgets/adw-button-row.js +1 -1
- package/lib/esm/widgets/adw-entry-row.js +1 -1
- package/lib/esm/widgets/adw-image-button.js +1 -1
- package/lib/esm/widgets/adw-preferences-group.js +1 -1
- package/lib/esm/widgets/adw-split-button.js +1 -1
- package/lib/esm/widgets/bin-layout.js +1 -0
- package/lib/esm/widgets/box-layout.js +1 -1
- package/lib/esm/widgets/css-names.js +1 -0
- package/lib/esm/widgets/gtk-box.js +1 -1
- package/lib/esm/widgets/gtk-button.js +1 -1
- package/lib/esm/widgets/gtk-check-button.js +1 -1
- package/lib/esm/widgets/gtk-entry.js +1 -1
- package/lib/esm/widgets/gtk-label.js +2 -2
- package/lib/esm/widgets/gtk-menu-button.js +1 -1
- package/lib/esm/widgets/gtk-popover-menu.js +1 -1
- package/lib/esm/widgets/gtk-scrolled-window.js +1 -1
- package/lib/esm/widgets/gtk-stack.js +1 -1
- package/lib/esm/widgets/index.js +1 -1
- package/lib/esm/widgets/label-markup-native.android.js +1 -0
- package/lib/esm/widgets/label-markup-native.ios.js +1 -0
- package/lib/esm/widgets/label-markup-native.js +1 -0
- package/lib/esm/widgets/label-markup.js +1 -1
- package/lib/esm/widgets/menu-slot.js +1 -0
- package/lib/esm/widgets/popup-menu-view.js +1 -1
- package/lib/esm/widgets/popup-menu.js +1 -1
- package/lib/esm/widgets/scrolled-window-policy.js +1 -1
- package/lib/esm/widgets/signals.js +1 -1
- package/lib/esm/widgets/single-child-base.js +1 -1
- package/lib/esm/widgets/single-child-cell.js +1 -1
- package/lib/esm/widgets/widget-layout.js +1 -1
- package/lib/types/button-bin.spec.d.ts +2 -0
- package/lib/types/css-names.spec.d.ts +1 -0
- package/lib/types/entry-properties.spec.d.ts +1 -0
- package/lib/types/index.d.ts +4 -2
- package/lib/types/menu-button-properties.spec.d.ts +2 -0
- package/lib/types/menu-model-door.spec.d.ts +1 -0
- package/lib/types/menu-model-route-d.node-gi.spec.d.ts +2 -0
- package/lib/types/name-selector.d.ts +20 -0
- package/lib/types/name-selector.spec.d.ts +2 -0
- package/lib/types/namespace/gio.d.ts +1 -1
- package/lib/types/template-xalign.spec.d.ts +2 -0
- package/lib/types/testing/ns-core.d.mts +30 -0
- package/lib/types/widgets/actions.d.ts +3 -3
- package/lib/types/widgets/adw-about-dialog.d.ts +2 -0
- package/lib/types/widgets/adw-action-row.d.ts +2 -0
- package/lib/types/widgets/adw-alert-dialog.d.ts +2 -0
- package/lib/types/widgets/adw-avatar.d.ts +2 -0
- package/lib/types/widgets/adw-banner.d.ts +2 -0
- package/lib/types/widgets/adw-bottom-sheet.d.ts +2 -0
- package/lib/types/widgets/adw-button-content.d.ts +2 -0
- package/lib/types/widgets/adw-carousel.d.ts +2 -0
- package/lib/types/widgets/adw-clamp.d.ts +2 -0
- package/lib/types/widgets/adw-data-grid.d.ts +2 -0
- package/lib/types/widgets/adw-header-bar.d.ts +2 -0
- package/lib/types/widgets/adw-image-button.d.ts +4 -2
- package/lib/types/widgets/adw-navigation-page.d.ts +2 -0
- package/lib/types/widgets/adw-navigation-view.d.ts +2 -0
- package/lib/types/widgets/adw-preferences-group.d.ts +2 -0
- package/lib/types/widgets/adw-preferences-page.d.ts +2 -0
- package/lib/types/widgets/adw-shortcut-label.d.ts +2 -0
- package/lib/types/widgets/adw-sidebar.d.ts +2 -0
- package/lib/types/widgets/adw-slider-row.d.ts +2 -0
- package/lib/types/widgets/adw-spinner.d.ts +2 -0
- package/lib/types/widgets/adw-split-button.d.ts +49 -24
- package/lib/types/widgets/adw-status-page.d.ts +2 -0
- package/lib/types/widgets/adw-tab-view.d.ts +2 -0
- package/lib/types/widgets/adw-toast-overlay.d.ts +2 -0
- package/lib/types/widgets/adw-toggle-group.d.ts +2 -0
- package/lib/types/widgets/adw-toggle.d.ts +2 -0
- package/lib/types/widgets/adw-toolbar-view.d.ts +2 -0
- package/lib/types/widgets/adw-view-stack.d.ts +2 -0
- package/lib/types/widgets/adw-view-switcher-bar.d.ts +2 -0
- package/lib/types/widgets/adw-window-title.d.ts +2 -0
- package/lib/types/widgets/adw-wrap-box.d.ts +2 -0
- package/lib/types/widgets/bin-layout.d.ts +12 -0
- package/lib/types/widgets/box-layout.d.ts +37 -0
- package/lib/types/widgets/carousel-indicator-base.d.ts +2 -0
- package/lib/types/widgets/css-names.d.ts +9 -0
- package/lib/types/widgets/gtk-action-bar.d.ts +2 -0
- package/lib/types/widgets/gtk-box.d.ts +11 -5
- package/lib/types/widgets/gtk-button.d.ts +8 -5
- package/lib/types/widgets/gtk-drop-down.d.ts +2 -0
- package/lib/types/widgets/gtk-entry.d.ts +64 -34
- package/lib/types/widgets/gtk-image.d.ts +2 -0
- package/lib/types/widgets/gtk-label.d.ts +26 -0
- package/lib/types/widgets/gtk-menu-button.d.ts +33 -18
- package/lib/types/widgets/gtk-popover-menu.d.ts +9 -7
- package/lib/types/widgets/gtk-scrolled-window.d.ts +9 -0
- package/lib/types/widgets/gtk-stack.d.ts +2 -0
- package/lib/types/widgets/gtk-text-view.d.ts +2 -0
- package/lib/types/widgets/index.d.ts +1 -2
- package/lib/types/widgets/label-markup-native.android.d.ts +5 -0
- package/lib/types/widgets/label-markup-native.d.ts +19 -0
- package/lib/types/widgets/label-markup-native.ios.d.ts +5 -0
- package/lib/types/widgets/label-markup.d.ts +62 -1
- package/lib/types/widgets/menu-slot.d.ts +51 -0
- package/lib/types/widgets/popup-menu-view.d.ts +3 -2
- package/lib/types/widgets/popup-menu.d.ts +8 -6
- package/lib/types/widgets/scrolled-window-policy.d.ts +4 -2
- package/lib/types/widgets/signals.d.ts +2 -0
- package/lib/types/widgets/single-child-base.d.ts +3 -0
- package/lib/types/widgets/single-child-cell.d.ts +10 -5
- package/lib/types/widgets/split-view-base.d.ts +2 -0
- package/lib/types/widgets/stack-page.d.ts +2 -0
- package/lib/types/widgets/styled-layout-base.d.ts +2 -0
- package/lib/types/widgets/view-stack-page.d.ts +2 -0
- package/lib/types/widgets/view-switcher-base.d.ts +2 -0
- package/lib/types/widgets/widget-layout.d.ts +2 -0
- package/package.json +20 -15
- package/src/testing/ns-core.mts +58 -0
- package/src/theme/adwaita.css +24 -11
|
@@ -16,6 +16,8 @@ declare const GtkStackPage_base: ((abstract new (...args: any[]) => {
|
|
|
16
16
|
emit(eventName: string, ...args: unknown[]): void;
|
|
17
17
|
get_property(name: string): unknown;
|
|
18
18
|
set_property(name: string, value: unknown): void;
|
|
19
|
+
get cssType(): string | undefined;
|
|
20
|
+
set cssType(value: string | undefined);
|
|
19
21
|
get halign(): string;
|
|
20
22
|
set halign(value: string | number);
|
|
21
23
|
get valign(): string;
|
|
@@ -8,6 +8,8 @@ declare const AdwStyledLayoutBase_base: ((abstract new (...args: any[]) => {
|
|
|
8
8
|
emit(eventName: string, ...args: unknown[]): void;
|
|
9
9
|
get_property(name: string): unknown;
|
|
10
10
|
set_property(name: string, value: unknown): void;
|
|
11
|
+
get cssType(): string | undefined;
|
|
12
|
+
set cssType(value: string | undefined);
|
|
11
13
|
get halign(): string;
|
|
12
14
|
set halign(value: string | number);
|
|
13
15
|
get valign(): string;
|
|
@@ -16,6 +16,8 @@ declare const AdwViewStackPage_base: ((abstract new (...args: any[]) => {
|
|
|
16
16
|
emit(eventName: string, ...args: unknown[]): void;
|
|
17
17
|
get_property(name: string): unknown;
|
|
18
18
|
set_property(name: string, value: unknown): void;
|
|
19
|
+
get cssType(): string | undefined;
|
|
20
|
+
set cssType(value: string | undefined);
|
|
19
21
|
get halign(): string;
|
|
20
22
|
set halign(value: string | number);
|
|
21
23
|
get valign(): string;
|
|
@@ -20,6 +20,8 @@ declare const AdwViewSwitcherBase_base: ((abstract new (...args: any[]) => {
|
|
|
20
20
|
emit(eventName: string, ...args: unknown[]): void;
|
|
21
21
|
get_property(name: string): unknown;
|
|
22
22
|
set_property(name: string, value: unknown): void;
|
|
23
|
+
get cssType(): string | undefined;
|
|
24
|
+
set cssType(value: string | undefined);
|
|
23
25
|
get halign(): string;
|
|
24
26
|
set halign(value: string | number);
|
|
25
27
|
get valign(): string;
|
|
@@ -47,6 +47,8 @@ export interface GtkWidgetLayout {
|
|
|
47
47
|
* The accessors keep their wider setter types (TS 5.1 unrelated accessor types).
|
|
48
48
|
*/
|
|
49
49
|
export declare abstract class GtkWidgetLayoutMembers {
|
|
50
|
+
get cssType(): string | undefined;
|
|
51
|
+
set cssType(value: string | undefined);
|
|
50
52
|
get halign(): string;
|
|
51
53
|
set halign(value: string | number);
|
|
52
54
|
get valign(): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/adwaita-nativescript",
|
|
3
|
-
"version": "0.64.
|
|
3
|
+
"version": "0.64.15-next.287",
|
|
4
4
|
"description": "Native Adwaita widgets for the NativeScript runtime — real NativeScript components (StackLayout/GridLayout/Switch/Label) styled like Libadwaita, not a webview",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"src/testing/ns-core.mts"
|
|
50
50
|
],
|
|
51
51
|
"scripts": {
|
|
52
|
-
"clear": "gjsify clear lib tsconfig.tsbuildinfo tsconfig.types.tsbuildinfo test.gjs.mjs test.node.mjs test.trees.gjs.mjs test.trees.node.mjs",
|
|
52
|
+
"clear": "gjsify clear lib tsconfig.tsbuildinfo tsconfig.types.tsbuildinfo test.gjs.mjs test.node.mjs test.trees.gjs.mjs test.trees.node.mjs test.node-gi.mjs",
|
|
53
53
|
"check": "gjsify tsc --noEmit",
|
|
54
54
|
"build": "gjsify run build:gjsify && gjsify run build:types",
|
|
55
55
|
"build:gjsify": "gjsify build --library 'src/**/*.{ts,js}' --exclude 'src/**/*.spec.{mts,ts}' 'src/test.{mts,ts}'",
|
|
@@ -59,9 +59,11 @@
|
|
|
59
59
|
"build:test:node": "gjsify build src/test.mts --app node --outfile test.node.mjs",
|
|
60
60
|
"build:test:trees:gjs": "gjsify build src/test.trees.mts --app gjs --no-minify --alias @nativescript/core=@gjsify/adwaita-nativescript/testing/ns-core --outfile test.trees.gjs.mjs",
|
|
61
61
|
"build:test:trees:node": "gjsify build src/test.trees.mts --app node --no-minify --alias @nativescript/core=@gjsify/adwaita-nativescript/testing/ns-core --outfile test.trees.node.mjs",
|
|
62
|
+
"build:test:node-gi": "gjsify build src/test.node-gi.mts --app node --no-minify --alias @nativescript/core=@gjsify/adwaita-nativescript/testing/ns-core --outfile test.node-gi.mjs",
|
|
62
63
|
"test": "gjsify run build:gjsify && gjsify run build:test && gjsify run test:node && gjsify run test:gjs",
|
|
63
64
|
"test:gjs": "gjsify run test.gjs.mjs && gjsify run test.trees.gjs.mjs",
|
|
64
|
-
"test:node": "node test.node.mjs && node test.trees.node.mjs"
|
|
65
|
+
"test:node": "node test.node.mjs && node test.trees.node.mjs",
|
|
66
|
+
"test:gjs-on-node": "gjsify run build:test:node-gi && node --conditions=gjsify-foreign-parents test.node-gi.mjs"
|
|
65
67
|
},
|
|
66
68
|
"keywords": [
|
|
67
69
|
"gjs",
|
|
@@ -73,15 +75,15 @@
|
|
|
73
75
|
"design-system"
|
|
74
76
|
],
|
|
75
77
|
"dependencies": {
|
|
76
|
-
"@gjsify/adwaita-core": "
|
|
77
|
-
"@gjsify/adwaita-fonts": "
|
|
78
|
-
"@gjsify/adwaita-icons": "
|
|
79
|
-
"@gjsify/canvas2d-core": "
|
|
80
|
-
"@gjsify/native-platform": "
|
|
78
|
+
"@gjsify/adwaita-core": "0.64.15-next.287",
|
|
79
|
+
"@gjsify/adwaita-fonts": "0.64.15-next.287",
|
|
80
|
+
"@gjsify/adwaita-icons": "0.64.15-next.287",
|
|
81
|
+
"@gjsify/canvas2d-core": "0.64.15-next.287",
|
|
82
|
+
"@gjsify/native-platform": "0.64.15-next.287"
|
|
81
83
|
},
|
|
82
84
|
"peerDependencies": {
|
|
83
85
|
"@nativescript/core": "*",
|
|
84
|
-
"@gjsify/app-settings": "
|
|
86
|
+
"@gjsify/app-settings": "0.64.15-next.287"
|
|
85
87
|
},
|
|
86
88
|
"peerDependenciesMeta": {
|
|
87
89
|
"@nativescript/core": {
|
|
@@ -92,11 +94,13 @@
|
|
|
92
94
|
}
|
|
93
95
|
},
|
|
94
96
|
"devDependencies": {
|
|
95
|
-
"@gjsify/
|
|
96
|
-
"@gjsify/
|
|
97
|
-
"@gjsify/
|
|
98
|
-
"@gjsify/
|
|
99
|
-
"@gjsify/
|
|
97
|
+
"@gjsify/adwaita-gobject-native": "0.64.15-next.287",
|
|
98
|
+
"@gjsify/app-settings": "0.64.15-next.287",
|
|
99
|
+
"@gjsify/blueprint": "0.64.15-next.287",
|
|
100
|
+
"@gjsify/cli": "0.64.15-next.287",
|
|
101
|
+
"@gjsify/node-gi": "file:../../node-gi/node-gi",
|
|
102
|
+
"@gjsify/unit": "0.64.15-next.287",
|
|
103
|
+
"@gjsify/vite-plugin-blueprint": "0.64.15-next.287",
|
|
100
104
|
"@types/node": "^25.9.2",
|
|
101
105
|
"typescript": "^6.0.3"
|
|
102
106
|
},
|
|
@@ -125,5 +129,6 @@
|
|
|
125
129
|
"bugs": {
|
|
126
130
|
"url": "https://github.com/gjsify/gjsify/issues"
|
|
127
131
|
},
|
|
128
|
-
"homepage": "https://github.com/gjsify/gjsify/tree/main/packages/nativescript-bridge/adwaita#readme"
|
|
132
|
+
"homepage": "https://github.com/gjsify/gjsify/tree/main/packages/nativescript-bridge/adwaita#readme",
|
|
133
|
+
"gitHead": "5742b282a8a2bc8633dd8384ef436768447f6a83"
|
|
129
134
|
}
|
package/src/testing/ns-core.mts
CHANGED
|
@@ -263,6 +263,16 @@ export class View extends Observable {
|
|
|
263
263
|
* missing so the first `className` write died inside a constructor.
|
|
264
264
|
*/
|
|
265
265
|
readonly cssClasses: Set<string> = new Set();
|
|
266
|
+
/**
|
|
267
|
+
* The real `View.cssType` derives `typeName.toLowerCase()` on first read and keeps it in
|
|
268
|
+
* `_cssType`; a subclass accessor wins over both, which is what a port widget relies on.
|
|
269
|
+
*/
|
|
270
|
+
get cssType(): string | undefined {
|
|
271
|
+
return this.constructor.name.toLowerCase();
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
set cssType(_value: string | undefined) {}
|
|
275
|
+
|
|
266
276
|
/**
|
|
267
277
|
* `'auto'` until written, and HELD ON THE {@link Style} as `widthProperty` /
|
|
268
278
|
* `heightProperty` are (`ui/styling/style-properties.ts` registers both on `Style`;
|
|
@@ -624,6 +634,17 @@ export class StackLayout extends LayoutBase {
|
|
|
624
634
|
orientation: 'horizontal' | 'vertical' = 'vertical';
|
|
625
635
|
}
|
|
626
636
|
|
|
637
|
+
/**
|
|
638
|
+
* Upstream's `DockLayout`, of which only `stretchLastChild` is state a spec can read — the
|
|
639
|
+
* docking itself is `onLayout`'s arithmetic on a real allocation and happens nowhere off a
|
|
640
|
+
* device. `true` is the platform default (`ui/layouts/dock-layout/dock-layout-common`), and a
|
|
641
|
+
* double that started at `false` would let `widgets/bin-layout.ts` rely on a default it does
|
|
642
|
+
* not have.
|
|
643
|
+
*/
|
|
644
|
+
export class DockLayout extends LayoutBase {
|
|
645
|
+
stretchLastChild: boolean = true;
|
|
646
|
+
}
|
|
647
|
+
|
|
627
648
|
export type GridUnitType = 'auto' | 'star' | 'pixel';
|
|
628
649
|
|
|
629
650
|
export class ItemSpec {
|
|
@@ -667,11 +688,22 @@ export class GridLayout extends LayoutBase {
|
|
|
667
688
|
if (at !== -1) this._rows.splice(at, 1);
|
|
668
689
|
}
|
|
669
690
|
|
|
691
|
+
/** `GridLayoutBase.removeColumn` — BY SPEC, like `removeRow`, not by index. */
|
|
692
|
+
removeColumn(itemSpec: ItemSpec): void {
|
|
693
|
+
const at = this._cols.indexOf(itemSpec);
|
|
694
|
+
if (at !== -1) this._cols.splice(at, 1);
|
|
695
|
+
}
|
|
696
|
+
|
|
670
697
|
/** `GridLayoutBase.getColumns` — a copy, as on a device. */
|
|
671
698
|
getColumns(): ItemSpec[] {
|
|
672
699
|
return [...this._cols];
|
|
673
700
|
}
|
|
674
701
|
|
|
702
|
+
/** `GridLayoutBase.getRows` — the same read on the other axis. */
|
|
703
|
+
getRows(): ItemSpec[] {
|
|
704
|
+
return [...this._rows];
|
|
705
|
+
}
|
|
706
|
+
|
|
675
707
|
removeColumns(): void {
|
|
676
708
|
this._cols.length = 0;
|
|
677
709
|
}
|
|
@@ -893,6 +925,14 @@ export class Label extends View {
|
|
|
893
925
|
this._text = value?.toString() ?? '';
|
|
894
926
|
}
|
|
895
927
|
|
|
928
|
+
/**
|
|
929
|
+
* `TextBase._setNativeText` — the framework's sink for every text write, and the seam
|
|
930
|
+
* the native markup path draws at (`widgets/label-markup-native.ts`). There is no
|
|
931
|
+
* native text view off a device, so this records nothing: it exists because the port
|
|
932
|
+
* overrides it and `super._setNativeText()` has to be callable.
|
|
933
|
+
*/
|
|
934
|
+
_setNativeText(_reset = false): void {}
|
|
935
|
+
|
|
896
936
|
textWrap = false;
|
|
897
937
|
textAlignment = 'initial';
|
|
898
938
|
textOverflow = 'initial';
|
|
@@ -1261,3 +1301,21 @@ export const ApplicationSettings = {
|
|
|
1261
1301
|
SETTINGS.set(key, value);
|
|
1262
1302
|
},
|
|
1263
1303
|
};
|
|
1304
|
+
|
|
1305
|
+
/** `CSSHelper.createSelector('#x')` answers an `IdSelector`; the double is the stock one's shape. */
|
|
1306
|
+
class MockIdSelector {
|
|
1307
|
+
id: string | undefined;
|
|
1308
|
+
constructor(id: string) {
|
|
1309
|
+
this.id = id;
|
|
1310
|
+
}
|
|
1311
|
+
match(node: { id?: string }): boolean {
|
|
1312
|
+
return node.id === this.id;
|
|
1313
|
+
}
|
|
1314
|
+
lookupSort(sorter: { sortAsUniversal(selector: unknown): void }, base?: unknown): void {
|
|
1315
|
+
sorter.sortAsUniversal(base ?? this);
|
|
1316
|
+
}
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
export const CSSHelper = {
|
|
1320
|
+
createSelector: (selector: string): object => new MockIdSelector(selector.slice(1)),
|
|
1321
|
+
};
|
package/src/theme/adwaita.css
CHANGED
|
@@ -506,13 +506,22 @@ Page.adw-window {
|
|
|
506
506
|
|
|
507
507
|
/* ===== Button (variants) ===== */
|
|
508
508
|
|
|
509
|
+
/* A FLOOR AND NOT A BOX. 38 is libadwaita's `min-height: 24px` plus its 5px of vertical
|
|
510
|
+
* padding twice (_buttons.scss, pin 42f647ff) — a MINIMUM there, and GTK has no CSS
|
|
511
|
+
* `height` at all. Writing it as NativeScript's `height`, which is exact, made every
|
|
512
|
+
* button in the port exactly 38 tall and silently swallowed `height-request`, which the
|
|
513
|
+
* bridge maps to `minHeight` and which GTK treats as a second floor: Learn6502's d-pad
|
|
514
|
+
* asks each of its five cells for 50×50 and got 50×38, so the cross came out as a row of
|
|
515
|
+
* flattened buttons. `min-height` is the property that means what the SCSS means, it
|
|
516
|
+
* composes with `height-request` the way GTK composes its two floors — the larger wins —
|
|
517
|
+
* and a caller that really wants an exact box can still write `height` itself. */
|
|
509
518
|
.adw-button {
|
|
510
519
|
background-color: rgba(0, 0, 0, 0.08);
|
|
511
520
|
color: rgba(0, 0, 0, 0.8);
|
|
512
521
|
border-radius: 9;
|
|
513
522
|
font-weight: 700;
|
|
514
523
|
padding: 5 16 5 16;
|
|
515
|
-
height: 38;
|
|
524
|
+
min-height: 38;
|
|
516
525
|
}
|
|
517
526
|
|
|
518
527
|
.adw-button.suggested-action {
|
|
@@ -534,10 +543,10 @@ Page.adw-window {
|
|
|
534
543
|
* pin 42f647ff). The padding is the whole variant, and it is why this rule HAS to
|
|
535
544
|
* restate the height.
|
|
536
545
|
*
|
|
537
|
-
* `.adw-button` above pins
|
|
538
|
-
*
|
|
539
|
-
* `adw-spinner.size
|
|
540
|
-
* box it
|
|
546
|
+
* `.adw-button` above pins a 38 floor, and this variant doubles the vertical padding
|
|
547
|
+
* inside it. While that floor was written as an EXACT NativeScript `height` — the
|
|
548
|
+
* non-equivalence ADR 0034 measured for `adw-spinner.size` — the variant could not grow
|
|
549
|
+
* the box it sat in: the base budgets 38 − (5 + 5) = 28 for the label, and this one left
|
|
541
550
|
* 38 − (10 + 10) = 18 for a `.adw-button-label` at `font-size: 15`, whose line box does
|
|
542
551
|
* not fit in 18. The pill was clipped, and every consumer that wanted one had to
|
|
543
552
|
* override the height itself — which is how the defect surfaced, in Learn6502.
|
|
@@ -547,13 +556,17 @@ Page.adw-window {
|
|
|
547
556
|
* 34, + 10px twice is 44 — so the pill is taller than the plain button there too.
|
|
548
557
|
*
|
|
549
558
|
* THE RULE THIS VARIANT BROKE, stated because the next variant will meet it: in this
|
|
550
|
-
* stylesheet a class that changes vertical padding on a widget whose base
|
|
551
|
-
* `height` must restate that
|
|
552
|
-
* button halves do (38) beside their own padding. This one did not,
|
|
559
|
+
* stylesheet a class that changes vertical padding on a widget whose base states a
|
|
560
|
+
* `min-height` must restate that floor at its own padding. `.adw-button.circular` does
|
|
561
|
+
* (34), and both split button halves do (38) beside their own padding. This one did not,
|
|
562
|
+
* and nothing said so. The floors are `min-*` rather than `height` / `width` since the
|
|
563
|
+
* d-pad incident above, so a `height-request` larger than the floor now wins as it does
|
|
564
|
+
* in GTK — but a floor that is too SMALL for its own padding still clips, which is the
|
|
565
|
+
* half this comment is about and the reason the number is restated here. */
|
|
553
566
|
.adw-button.pill {
|
|
554
567
|
border-radius: 9999;
|
|
555
568
|
padding: 10 32 10 32;
|
|
556
|
-
height: 48;
|
|
569
|
+
min-height: 48;
|
|
557
570
|
}
|
|
558
571
|
|
|
559
572
|
/* `%circular_button` — the explicit exception to the 9px rounded square: a full
|
|
@@ -563,8 +576,8 @@ Page.adw-window {
|
|
|
563
576
|
* at all", and a class with no rule would have drawn a rounded rectangle instead. The
|
|
564
577
|
* 34 is the same number `.adw-image-button` above carries, from the same line. */
|
|
565
578
|
.adw-button.circular {
|
|
566
|
-
width: 34;
|
|
567
|
-
height: 34;
|
|
579
|
+
min-width: 34;
|
|
580
|
+
min-height: 34;
|
|
568
581
|
border-radius: 9999;
|
|
569
582
|
padding: 0;
|
|
570
583
|
}
|