Skip to content

Commit

Permalink
max height
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikMennen committed Nov 10, 2023
1 parent 84d5f7e commit f0df3cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/OneWare.Core/Views/Windows/MainView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
</Border>
</Grid>

<Panel Name="DialogControlPanel" IsVisible="False" MaxWidth="{Binding #MainViewView.Bounds.Width}" MaxHeight="{Binding #MainViewView.Bounds.Height}">
<Panel Name="DialogControlPanel" IsVisible="False">
<Border BoxShadow="0 6 8 0 #4F000000" Background="{DynamicResource ThemeBackgroundBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" CornerRadius="8" BorderThickness="1" BorderBrush="{DynamicResource ThemeBorderLowBrush}">
<Grid RowDefinitions="30, *">
<StackPanel Margin="8 0" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center">
Expand Down
4 changes: 2 additions & 2 deletions src/OneWare.Core/Views/Windows/MainView.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ private void SetVirtualDialog(FlexibleWindow window)
{
DialogControlPanel.IsVisible = true;
DialogControl.Content = window;
DialogControl.Width = window.PrefWidth;
DialogControl.Height = window.PrefHeight;
DialogControl.Width = window.PrefWidth < this.Bounds.Width ? window.PrefWidth : this.Bounds.Width;
DialogControl.Height = window.PrefHeight + 40 < this.Bounds.Height ? window.PrefHeight : this.Bounds.Height - 40;
DialogControl.Background = window.WindowBackground;
DialogTitle.Text = window.Title;
if (window.CustomIcon != null)
Expand Down

0 comments on commit f0df3cf

Please sign in to comment.