mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Sidebar - Made sidebar resizable (to an extend)
Sidebar - Truncate long profile names Profile editor - Added shift+click on eye-icon in profile tree to focus an element Profile editor - Fixed layer property prefix/affix vertical alignment UI - Made shutdown via tray more responsive UI - Fixed several memory leaks
This commit is contained in:
1 parent
bab566a2b9
commit
6087a45a18
26 files changed
+298
-147
No files matched your search
@@ -6,10 +6,8 @@
|
||||
xmlns:s="https://github.com/canton7/Stylet"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
xmlns:converters="clr-namespace:Artemis.UI.Converters"
|
||||
xmlns:dialogs="clr-namespace:Artemis.UI.Screens.Sidebar.Dialogs"
|
||||
xmlns:shared="clr-namespace:Artemis.UI.Shared;assembly=Artemis.UI.Shared"
|
||||
xmlns:profileEdit="clr-namespace:Artemis.UI.Screens.Sidebar.Dialogs.ProfileEdit"
|
||||
xmlns:svgc="http://sharpvectors.codeplex.com/svgc/"
|
||||
xmlns:core="clr-namespace:Artemis.Core;assembly=Artemis.Core"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="280"
|
||||
@@ -17,9 +15,10 @@
|
||||
Width="800">
|
||||
<UserControl.Resources>
|
||||
<converters:InverseBooleanConverter x:Key="InverseBooleanConverter" />
|
||||
<shared:StreamToBitmapImageConverter x:Key="StreamToBitmapImageConverter"/>
|
||||
<shared:NullToVisibilityConverter x:Key="NullToVisibilityConverter" />
|
||||
<shared:BindingProxy x:Key="DataContextProxy" Data="{Binding}" />
|
||||
<shared:NullToVisibilityConverter x:Key="NullToVisibilityConverter" />
|
||||
<shared:StreamToBitmapImageConverter x:Key="StreamToBitmapImageConverter" />
|
||||
<shared:StreamToSvgImageConverter x:Key="StreamToSvgImageConverter" />
|
||||
</UserControl.Resources>
|
||||
<Grid Margin="16">
|
||||
<Grid.RowDefinitions>
|
||||
@@ -112,9 +111,9 @@
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<materialDesign:PackIcon Grid.Column="0"
|
||||
<materialDesign:PackIcon Grid.Column="0"
|
||||
Kind="{Binding DataContext.SelectedIcon.Icon, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Mode=OneWay}"
|
||||
Width="45"
|
||||
Width="45"
|
||||
Height="45"
|
||||
Margin="0 0 10 0"
|
||||
VerticalAlignment="Center" />
|
||||
@@ -154,14 +153,14 @@
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Grid.Column="0"
|
||||
<Image Grid.Column="0"
|
||||
Source="{Binding DataContext.SelectedImage, Converter={StaticResource StreamToBitmapImageConverter}, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
||||
RenderOptions.BitmapScalingMode="HighQuality"
|
||||
Margin="0 0 10 0"
|
||||
Width="45"
|
||||
Width="45"
|
||||
Height="45"
|
||||
VerticalAlignment="Center" />
|
||||
<Button Grid.Column="1"
|
||||
VerticalAlignment="Center"
|
||||
RenderOptions.BitmapScalingMode="HighQuality" />
|
||||
<Button Grid.Column="1"
|
||||
Command="{s:Action SelectBitmapFile}"
|
||||
Style="{StaticResource MaterialDesignRaisedButton}"
|
||||
ToolTip="Select an image">
|
||||
@@ -185,13 +184,14 @@
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<svgc:SvgViewbox Grid.Column="0"
|
||||
StreamSource="{Binding DataContext.SelectedImage, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
||||
Margin="0 0 10 0"
|
||||
Width="45"
|
||||
Height="45"
|
||||
VerticalAlignment="Center" />
|
||||
<Button Grid.Column="1"
|
||||
<Image Grid.Column="0"
|
||||
Source="{Binding DataContext.SelectedImage, Converter={StaticResource StreamToSvgImageConverter}, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
||||
Margin="0 0 10 0"
|
||||
Width="45"
|
||||
Height="45"
|
||||
VerticalAlignment="Center"
|
||||
RenderOptions.BitmapScalingMode="HighQuality" />
|
||||
<Button Grid.Column="1"
|
||||
Command="{s:Action SelectSvgFile}"
|
||||
Style="{StaticResource MaterialDesignRaisedButton}"
|
||||
ToolTip="Select an image">
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
Padding="8">
|
||||
<!-- Above is a dumb hack to get the context menu to cover the entire item -->
|
||||
<UserControl.Resources>
|
||||
<shared:StreamToBitmapImageConverter x:Key="StreamToBitmapImageConverter" />
|
||||
<converters:ValuesAdditionConverter x:Key="ValuesAddition" />
|
||||
</UserControl.Resources>
|
||||
<UserControl.ContextMenu>
|
||||
<ContextMenu>
|
||||
@@ -52,17 +52,17 @@
|
||||
<materialDesign:PackIcon Kind="Export" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Duplicate" Command="{s:Action Duplicate}" >
|
||||
<MenuItem Header="Duplicate" Command="{s:Action Duplicate}">
|
||||
<MenuItem.Icon>
|
||||
<materialDesign:PackIcon Kind="ContentDuplicate" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Copy" Command="{s:Action Copy}" >
|
||||
<MenuItem Header="Copy" Command="{s:Action Copy}">
|
||||
<MenuItem.Icon>
|
||||
<materialDesign:PackIcon Kind="ContentCopy" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Paste" Command="{s:Action Paste}" >
|
||||
<MenuItem Header="Paste" Command="{s:Action Paste}">
|
||||
<MenuItem.Icon>
|
||||
<materialDesign:PackIcon Kind="ContentPaste" />
|
||||
</MenuItem.Icon>
|
||||
@@ -77,12 +77,17 @@
|
||||
</UserControl.ContextMenu>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<shared:ProfileConfigurationIcon Grid.Column="0" VerticalAlignment="Center" ConfigurationIcon="{Binding ProfileConfiguration.Icon}" Width="20" Height="20">
|
||||
<shared:ProfileConfigurationIcon Grid.Column="0"
|
||||
x:Name="ProfileIcon"
|
||||
VerticalAlignment="Center"
|
||||
ConfigurationIcon="{Binding ProfileConfiguration.Icon}"
|
||||
Width="20"
|
||||
Height="20">
|
||||
<shared:ProfileConfigurationIcon.Style>
|
||||
<Style>
|
||||
<Style.Triggers>
|
||||
@@ -107,15 +112,22 @@
|
||||
</shared:ProfileConfigurationIcon.Style>
|
||||
</shared:ProfileConfigurationIcon>
|
||||
|
||||
<TextBlock Grid.Column="1" FontSize="12" Margin="10 0 0 0" VerticalAlignment="Center" Text="{Binding ProfileConfiguration.Name}">
|
||||
<TextBlock Grid.Column="1"
|
||||
x:Name="ProfileName"
|
||||
FontSize="12"
|
||||
Margin="10 0 0 0"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding ProfileConfiguration.Name}"
|
||||
TextTrimming="CharacterEllipsis">
|
||||
<TextBlock.Style>
|
||||
<Style>
|
||||
<Style TargetType="TextBlock">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsProfileActive}" Value="False">
|
||||
<DataTrigger.EnterActions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard>
|
||||
<DoubleAnimation Storyboard.TargetProperty="Opacity" To="0.33" Duration="0:0:0.25" />
|
||||
<DoubleAnimation Storyboard.TargetProperty="Opacity" To="0.33" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</DataTrigger.EnterActions>
|
||||
@@ -132,7 +144,21 @@
|
||||
</TextBlock.Style>
|
||||
</TextBlock>
|
||||
|
||||
<Border Grid.Column="0" Grid.ColumnSpan="2" BorderThickness="1" BorderBrush="{DynamicResource MaterialDesignBody}" Height="1" Opacity="0">
|
||||
<Border Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
BorderThickness="1"
|
||||
BorderBrush="{DynamicResource MaterialDesignBody}"
|
||||
Height="1"
|
||||
Opacity="0"
|
||||
HorizontalAlignment="Left">
|
||||
<!-- Ensure the line covers the profile and the text but not the full two columns -->
|
||||
<Border.Width>
|
||||
<MultiBinding Converter="{StaticResource ValuesAddition}">
|
||||
<Binding Path="ActualWidth" ElementName="ProfileIcon" />
|
||||
<Binding Path="ActualWidth" ElementName="ProfileName" />
|
||||
<Binding Path="Margin.Left" ElementName="ProfileName" />
|
||||
</MultiBinding>
|
||||
</Border.Width>
|
||||
<Border.Style>
|
||||
<Style>
|
||||
<Style.Triggers>
|
||||
@@ -160,7 +186,7 @@
|
||||
<Button Grid.Column="2" ToolTip="View properties" Width="20" Height="20" Command="{s:Action ViewProperties}" HorizontalAlignment="Right">
|
||||
<Button.Style>
|
||||
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource MaterialDesignIconForegroundButton}">
|
||||
<Setter Property="Visibility" Value="Hidden" />
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsMouseOver, RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}, Mode=FindAncestor}}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible" />
|
||||
@@ -173,7 +199,7 @@
|
||||
<ToggleButton Grid.Column="3" ToolTip="Suspend profile" Width="18" Height="18" Margin="2 0 0 0" IsChecked="{Binding IsSuspended}">
|
||||
<ToggleButton.Style>
|
||||
<Style TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource MaterialDesignFlatToggleButton}">
|
||||
<Setter Property="Visibility" Value="Hidden" />
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsMouseOver, RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}, Mode=FindAncestor}}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible" />
|
||||
@@ -183,6 +209,5 @@
|
||||
</ToggleButton.Style>
|
||||
<materialDesign:PackIcon Kind="Pause" Height="14" Width="14" />
|
||||
</ToggleButton>
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -119,7 +119,7 @@
|
||||
|
||||
<!-- Bottom buttons -->
|
||||
<Separator Grid.Row="4" Margin="8" />
|
||||
<StackPanel Grid.Row="5" Orientation="Horizontal" HorizontalAlignment="Center" Margin="5 0 5 5">
|
||||
<WrapPanel Grid.Row="5" Orientation="Horizontal" HorizontalAlignment="Left" Margin="5 0 5 5">
|
||||
<Button Style="{StaticResource MaterialDesignIconForegroundButton}"
|
||||
Width="44"
|
||||
Height="44"
|
||||
@@ -160,7 +160,7 @@
|
||||
CommandParameter="https://wiki.artemis-rgb.com/en/donating">
|
||||
<materialDesign:PackIcon Kind="Gift" Width="20" Height="20" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</WrapPanel>
|
||||
</Grid>
|
||||
</materialDesign:DialogHost>
|
||||
</UserControl>
|
||||
Reference in new issue
Block a user