MinHeight, Toolbar toggle, style for combobox
This commit is contained in:
@@ -162,7 +162,11 @@
|
||||
</AppBarButton>
|
||||
|
||||
<AppBarElementContainer VerticalAlignment="Center">
|
||||
<ComboBox x:Name="AlignmentListView" SelectionChanged="AlignmentChanged">
|
||||
<ComboBox
|
||||
x:Name="AlignmentListView"
|
||||
Background="Transparent"
|
||||
BorderBrush="Transparent"
|
||||
SelectionChanged="AlignmentChanged">
|
||||
<ComboBoxItem Tag="left">
|
||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||
<Viewbox Width="16">
|
||||
@@ -229,34 +233,17 @@
|
||||
<PathIcon Data="{StaticResource EmojiPathIcon}" />
|
||||
</AppBarButton.Icon>
|
||||
</AppBarButton>
|
||||
<AppBarButton
|
||||
x:Name="LinkButton"
|
||||
|
||||
<AppBarToggleButton
|
||||
x:Name="WebviewToolBarButton"
|
||||
Width="48"
|
||||
Click="LinkButtonClicked"
|
||||
FrameworkElement.AllowFocusOnInteraction="True"
|
||||
Label="Add HyperLink"
|
||||
ToolTipService.ToolTip="Add HyperLink">
|
||||
<AppBarButton.Flyout>
|
||||
<Flyout x:Name="HyperlinkFlyout">
|
||||
<StackPanel Width="250" Spacing="6">
|
||||
<TextBox x:Name="HyperlinkTextBox" Header="Text" />
|
||||
<TextBox
|
||||
x:Name="LinkUrlTextBox"
|
||||
Header="Link"
|
||||
PlaceholderText="https://" />
|
||||
<Button
|
||||
x:Name="AddHyperlinkButton"
|
||||
Margin="0,6"
|
||||
HorizontalAlignment="Stretch"
|
||||
Click="HyperlinkAddClicked"
|
||||
Content="{x:Bind domain:Translator.AddHyperlink}" />
|
||||
</StackPanel>
|
||||
</Flyout>
|
||||
</AppBarButton.Flyout>
|
||||
<AppBarButton.Icon>
|
||||
<PathIcon Data="{StaticResource AddLinkPathIcon}" />
|
||||
</AppBarButton.Icon>
|
||||
</AppBarButton>
|
||||
Click="WebViewToggleButtonClicked"
|
||||
Label="Webview ToolBar"
|
||||
ToolTipService.ToolTip="Webview ToolBar">
|
||||
<AppBarToggleButton.Icon>
|
||||
<PathIcon Data="{StaticResource WebviewToolBarPathIcon}" />
|
||||
</AppBarToggleButton.Icon>
|
||||
</AppBarToggleButton>
|
||||
</CommandBar>
|
||||
<Border
|
||||
Grid.Row="1"
|
||||
|
||||
@@ -122,14 +122,6 @@ namespace Wino.Dialogs
|
||||
Hide();
|
||||
}
|
||||
|
||||
private async void HyperlinkAddClicked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
await InvokeScriptSafeAsync($"addHyperlink('{LinkUrlTextBox.Text}')");
|
||||
|
||||
LinkUrlTextBox.Text = string.Empty;
|
||||
HyperlinkFlyout.Hide();
|
||||
}
|
||||
|
||||
private async void BoldButtonClicked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
await InvokeScriptSafeAsync("editor.execCommand('bold')");
|
||||
@@ -253,13 +245,6 @@ namespace Wino.Dialogs
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
private async void LinkButtonClicked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
HyperlinkTextBox.Text = await TryGetSelectedTextAsync();
|
||||
|
||||
HyperlinkFlyout.ShowAt(LinkButton);
|
||||
}
|
||||
|
||||
private async Task UpdateEditorThemeAsync()
|
||||
{
|
||||
await _domLoadedTask.Task;
|
||||
@@ -373,5 +358,11 @@ namespace Wino.Dialogs
|
||||
private void SignatureNameTextBoxTextChanged(object sender, TextChangedEventArgs e) => IsPrimaryButtonEnabled = !string.IsNullOrWhiteSpace(SignatureNameTextBox.Text);
|
||||
|
||||
private void InvertComposerThemeClicked(object sender, RoutedEventArgs e) => IsComposerDarkMode = !IsComposerDarkMode;
|
||||
|
||||
private async void WebViewToggleButtonClicked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var enable = WebviewToolBarButton.IsChecked == true ? "true" : "false";
|
||||
await InvokeScriptSafeAsync($"toggleToolbar('{enable}');");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user