Skip to content

Commit f5f977e

Browse files
committed
feat: link qtabbar
1 parent e36cd6e commit f5f977e

2 files changed

Lines changed: 17 additions & 5 deletions

File tree

src/components/themes/ThemeGenerator.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,9 @@ watchEffect(() => {
232232
:text="colors.Text"
233233
:base="colors.Base"
234234
:tab-widget-pane="styles['QTabWidget::pane'].border"
235+
:tab-borderless="styles['QTabBar::tab'].border"
236+
:tab-padding="styles['QTabBar::tab'].padding"
237+
:tab-gap="styles['QTabBar::tab']['margin-right']"
235238
/>
236239
</div>
237240
</div>

src/components/themes/windows/SettingsThemed.vue

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ const {
1111
backgroundText,
1212
base,
1313
tabWidgetPane,
14+
tabBorderless,
15+
tabPadding,
16+
tabGap,
1417
} = defineProps<{
1518
"highlight" : string;
1619
"highlightText" : string;
@@ -20,6 +23,9 @@ const {
2023
"backgroundText": string;
2124
"base" : string;
2225
"tabWidgetPane" : boolean;
26+
"tabBorderless" : boolean;
27+
"tabPadding" : false | string;
28+
"tabGap" : false | number;
2329
}>();
2430
2531
const catPackStore = useCatPackState();
@@ -90,15 +96,18 @@ const itemsThemesSettings = [
9096
v-for="name in ['Features', 'User Interface', 'Console']"
9197
:key="name"
9298
:class="[
93-
'text-sm p-2 leading-none rounded-t-sm text-xs',
94-
name === 'User Interface'
99+
'text-sm leading-none text-xs',
100+
name === 'User Interface' && !tabBorderless
95101
? 'h-[32px] border-x-2 border-t-2'
96102
: 'h-[30px] border-b-2 opacity-80',
97103
]"
98104
:style="{
99-
background : buttonColor,
100-
borderColor: background,
101-
color : backgroundText,
105+
background : tabBorderless ? 'transparent' : buttonColor,
106+
borderColor : tabBorderless ? 'transparent' : background,
107+
borderRadius: tabBorderless ? 0 : '2px 2px 0 0',
108+
color : backgroundText,
109+
marginRight : tabGap || 0,
110+
padding : tabPadding || '8px',
102111
}"
103112
>
104113
{{ name }}

0 commit comments

Comments
 (0)