Skip to content

Commit

Permalink
tooltip style change
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikMennen committed Jul 23, 2024
1 parent 9df0e84 commit 78edb5e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 22 deletions.
16 changes: 16 additions & 0 deletions src/OneWare.Core/Styles/IdeStyles.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,5 +174,21 @@
<Setter Property="Width" Value="NaN" />
<Setter Property="Padding" Value="5 0" />
</Style>

<Style Selector="ToolTip">
<Setter Property="CornerRadius" Value="3"/>
<Setter Property="Padding" Value="3" />
<Setter Property="Template">
<ControlTemplate>
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}"
Padding="{TemplateBinding Padding}">
<ContentPresenter Content="{TemplateBinding Content}" />
</Border>
</ControlTemplate>
</Setter>
</Style>

</Styles>
19 changes: 8 additions & 11 deletions src/OneWare.ErrorList/Views/ErrorListView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,27 @@
<Setter Property="Padding" Value="5" />
<Setter Property="Height" Value="30" />
</Style>

<Style Selector="Border.ChildBorder">
<Setter Property="Padding" Value="5,0,1,0" />
<Setter Property="Margin" Value="0,2,0,2" />
</Style>

<Style Selector="TextBlock.ChildText">
<Setter Property="Margin" Value="0,0,0,1" />
</Style>

<Style Selector="ListBoxItem">
<Setter Property="Padding" Value="0" />
<Setter Property="Margin" Value="0" />
</Style>

<Style Selector="ToolTip">
<Setter Property="MaxWidth" Value="300" />
<Setter Property="Template">
<ControlTemplate>
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Padding="{TemplateBinding Padding}">
<TextBlock Text="{TemplateBinding Content}" TextWrapping="Wrap" />
</Border>
</ControlTemplate>
</Setter>
</Style>

<Style Selector="ToolTip TextBlock">
<Setter Property="TextWrapping" Value="Wrap"/>
</Style>

<Style Selector="ToggleButton.ErrorToggle">
Expand Down
16 changes: 5 additions & 11 deletions src/OneWare.SearchList/Views/SearchListView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,13 @@
x:Class="OneWare.SearchList.Views.SearchListView" x:DataType="viewModels:SearchListViewModel"
Background="{DynamicResource ThemeControlLowBrush}">
<UserControl.Styles>

<Style Selector="ToolTip">
<Setter Property="MaxWidth" Value="300" />
<Setter Property="Template">
<ControlTemplate>
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Padding="{TemplateBinding Padding}">
<TextBlock Text="{TemplateBinding Content}" TextWrapping="Wrap" />
</Border>
</ControlTemplate>
</Setter>
</Style>

<Style Selector="ToolTip TextBlock">
<Setter Property="TextWrapping" Value="Wrap"/>
</Style>

</UserControl.Styles>
Expand Down

0 comments on commit 78edb5e

Please sign in to comment.