Skip to content

Commit e90514c

Browse files
committed
code_style: move onetime-style from Styles to the place where it is used
Signed-off-by: leo <longshuang@msn.cn>
1 parent f56ec6c commit e90514c

2 files changed

Lines changed: 19 additions & 20 deletions

File tree

‎src/Resources/Styles.axaml‎

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -702,25 +702,6 @@
702702
<Setter Property="Foreground" Value="{DynamicResource Brush.FG1}"/>
703703
</Style>
704704

705-
<Style Selector="ListBox.launcher_page_tabbar">
706-
<Setter Property="Background" Value="Transparent"/>
707-
</Style>
708-
<Style Selector="ListBox.launcher_page_tabbar ListBoxItem">
709-
<Setter Property="Padding" Value="0"/>
710-
</Style>
711-
<Style Selector="ListBox.launcher_page_tabbar ListBoxItem /template/ ContentPresenter#PART_ContentPresenter">
712-
<Setter Property="Background" Value="Transparent"/>
713-
<Setter Property="Opacity" Value=".5"/>
714-
</Style>
715-
<Style Selector="ListBox.launcher_page_tabbar ListBoxItem:pointerover /template/ ContentPresenter#PART_ContentPresenter">
716-
<Setter Property="Background" Value="Transparent"/>
717-
<Setter Property="Opacity" Value=".85"/>
718-
</Style>
719-
<Style Selector="ListBox.launcher_page_tabbar ListBoxItem:selected /template/ ContentPresenter#PART_ContentPresenter">
720-
<Setter Property="Background" Value="Transparent"/>
721-
<Setter Property="Opacity" Value="1"/>
722-
</Style>
723-
724705
<Style Selector="ListBox.repo_left_content_list">
725706
<Setter Property="Background" Value="Transparent"/>
726707
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>

‎src/Views/LauncherTabBar.axaml‎

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,30 @@
2929
PointerWheelChanged="ScrollTabs">
3030
<StackPanel Orientation="Horizontal">
3131
<ListBox x:Name="LauncherTabsList"
32-
Classes="launcher_page_tabbar"
32+
Background="Transparent"
3333
ItemsSource="{Binding Pages}"
3434
SelectionMode="AlwaysSelected"
3535
SelectedItem="{Binding ActivePage, Mode=TwoWay}"
3636
SelectionChanged="OnTabsSelectionChanged"
3737
LayoutUpdated="OnTabsLayoutUpdated">
38+
<ListBox.Styles>
39+
<Style Selector="ListBoxItem">
40+
<Setter Property="Padding" Value="0"/>
41+
</Style>
42+
<Style Selector="ListBoxItem /template/ ContentPresenter#PART_ContentPresenter">
43+
<Setter Property="Background" Value="Transparent"/>
44+
<Setter Property="Opacity" Value=".5"/>
45+
</Style>
46+
<Style Selector="ListBoxItem:pointerover /template/ ContentPresenter#PART_ContentPresenter">
47+
<Setter Property="Background" Value="Transparent"/>
48+
<Setter Property="Opacity" Value=".85"/>
49+
</Style>
50+
<Style Selector="ListBoxItem:selected /template/ ContentPresenter#PART_ContentPresenter">
51+
<Setter Property="Background" Value="Transparent"/>
52+
<Setter Property="Opacity" Value="1"/>
53+
</Style>
54+
</ListBox.Styles>
55+
3856
<ListBox.ItemsPanel>
3957
<ItemsPanelTemplate>
4058
<StackPanel Orientation="Horizontal" Height="30"/>

0 commit comments

Comments
 (0)