Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dialog title #245

Merged
merged 5 commits into from
Jan 4, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/Consolonia.Core/Drawing/DrawingContextImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,7 @@ public void DrawGeometry(IBrush brush, IPen pen, IGeometryImpl geometry)
// if we have strokes to draw
if (streamGeometry.Strokes.Count > 0)
{
if (pen == null || pen.Thickness == 0)
return;
pen = pen ?? new Pen(brush, 1);

var extractColorCheckPlatformSupported =
ExtractColorOrNullWithPlatformCheck(pen, out var lineStyle);
Expand Down
8 changes: 8 additions & 0 deletions src/Consolonia.Core/Text/Esc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@ internal static class Esc
public const string EnableBracketedPasteMode = "\u001b[?2004h";
public const string DisableBracktedPasteMode = "\u001b[?2004l";

// mouse tracking
public const string EnableMouseTracking = "\u001b[?1000h";
public const string DisableMouseTracking = "\u001b[?1000l";
public const string EnableMouseMotionTracking = "\u001b[?1002h";
public const string DisableMouseMotionTracking = "\u001b[?1002l";
public const string EnableExtendedMouseTracking = "\u001b[?1006h";
public const string DisableExtendedMouseTracking = "\u001b[?1006l";

// move cursor
public static string MoveCursorUp(int n)
{
Expand Down
85 changes: 42 additions & 43 deletions src/Consolonia.Themes/Templates/Controls/DialogWindow.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,49 +42,48 @@
<Panel Background="{TemplateBinding Background}"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<Border BorderThickness="{TemplateBinding BorderThickness}"
Margin="{DynamicResource ConsoloniaDialogWindowBorderMargin}">
<Border.BorderBrush>
<controls:LineBrush
Brush="{Binding Path=BorderBrush, RelativeSource={RelativeSource Mode=TemplatedParent}}"
LineStyle="DoubleLine" />
</Border.BorderBrush>
<Control
Width="{Binding Path=ContentSize.Width, RelativeSource={RelativeSource TemplatedParent}}"
Height="{Binding Path=ContentSize.Height, RelativeSource={RelativeSource TemplatedParent}}"
IsHitTestVisible="False"
Margin="{TemplateBinding Padding}" />
</Border>
<StackPanel HorizontalAlignment="Left"
VerticalAlignment="Top"
Margin="{DynamicResource ConsoloniaDialogWindowBorderMargin}"
ZIndex="10"
Orientation="Horizontal">
<helpers:SymbolsControl Text="{TemplateBinding Icon}"
IsVisible="{Binding Icon.Length}"
Foreground="{TemplateBinding BorderBrush}" />
<TextBlock Text="{TemplateBinding Title}"
Margin="1 0 0 0" />
</StackPanel>
<StackPanel Orientation="Horizontal"
ZIndex="10"
VerticalAlignment="Top"
HorizontalAlignment="Right"
Margin="{DynamicResource ConsoloniaDialogWindowBorderMargin}"
IsVisible="{TemplateBinding IsCloseButtonVisible}">
<Button Content="×"
Background="{x:Null}"
IsTabStop="False"
Padding="0"
Command="{Binding Path=CloseClick, RelativeSource={RelativeSource TemplatedParent}}">
<Button.Styles>
<Style Selector="Button">
<Setter Property="helpers:ButtonExtensions.Shadow"
Value="False" />
</Style>
</Button.Styles>
</Button>
</StackPanel>
<Grid ColumnDefinitions="*">
<Grid ColumnDefinitions="* Auto" VerticalAlignment="Top" Margin="1 0 0 0" ZIndex="30">
<StackPanel Orientation="Horizontal" >
<helpers:SymbolsControl Text="{TemplateBinding Icon}"
IsVisible="{Binding Icon.Length}"
Foreground="{TemplateBinding BorderBrush}" />
<TextBlock Text="╡" Foreground="{TemplateBinding BorderBrush}" />
<TextBlock Text="{TemplateBinding Title}" />
<TextBlock Text="╞" Foreground="{TemplateBinding BorderBrush}" />
</StackPanel>

<StackPanel Grid.Column="1"
Orientation="Horizontal"
IsVisible="{TemplateBinding IsCloseButtonVisible}">
<Button Content="×" Margin="1 0 0 0"
Background="{x:Null}"
IsTabStop="False"
Padding="0"
Command="{Binding Path=CloseClick, RelativeSource={RelativeSource TemplatedParent}}">
<Button.Styles>
<Style Selector="Button">
<Setter Property="helpers:ButtonExtensions.Shadow"
Value="False" />
</Style>
</Button.Styles>
</Button>
</StackPanel>
</Grid>

<Border BorderThickness="{TemplateBinding BorderThickness}" >
<Border.BorderBrush>
<controls:LineBrush
Brush="{Binding Path=BorderBrush, RelativeSource={RelativeSource Mode=TemplatedParent}}"
LineStyle="DoubleLine" />
</Border.BorderBrush>
<Control
Width="{Binding Path=ContentSize.Width, RelativeSource={RelativeSource TemplatedParent}}"
Height="{Binding Path=ContentSize.Height, RelativeSource={RelativeSource TemplatedParent}}"
IsHitTestVisible="False"
Margin="{TemplateBinding Padding}" />
</Border>
</Grid>
</Panel>

<!--Content-->
Expand Down
Loading