mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-15 17:30:27 +08:00
chore: 标题滚动可选开启
This commit is contained in:
@@ -32,6 +32,7 @@ namespace MaaWpfGui.Constants
|
||||
public const string Localization = "GUI.Localization";
|
||||
public const string MinimizeToTray = "GUI.MinimizeToTray";
|
||||
public const string HideCloseButton = "GUI.HideCloseButton";
|
||||
public const string WindowTitleScrollable = "GUI.WindowTitleScrollable";
|
||||
public const string UseLogItemDateFormat = "GUI.UseLogItemDateFormat";
|
||||
public const string LogItemDateFormat = "GUI.LogItemDateFormatString";
|
||||
public const string WindowPlacement = "GUI.Placement";
|
||||
|
||||
@@ -301,6 +301,7 @@ Please do not check it when the stage OF-1 is not unlocked.</system:String>
|
||||
<system:String x:Key="MinimizeToTray">Hide to tray when minimized</system:String>
|
||||
<system:String x:Key="SystemNotification">System Notification</system:String>
|
||||
<system:String x:Key="HideCloseButton">Hide close button</system:String>
|
||||
<system:String x:Key="WindowTitleScrollable">Window Title Scrolling</system:String>
|
||||
<system:String x:Key="UseLogItemDateFormat">Custom log date format</system:String>
|
||||
<system:String x:Key="LogItemDateFormatString">Date format string</system:String>
|
||||
<system:String x:Key="PromptRestartForSettingsChange">Restart immediately to apply changes?</system:String>
|
||||
|
||||
@@ -302,6 +302,7 @@
|
||||
<system:String x:Key="MinimizeToTray">最小化した際にトレイに表示</system:String>
|
||||
<system:String x:Key="SystemNotification">重要な通知をポップアップする</system:String>
|
||||
<system:String x:Key="HideCloseButton">「閉じる」ボタンを隠す</system:String>
|
||||
<system:String x:Key="WindowTitleScrollable">タイトルのスクロール機能</system:String>
|
||||
<system:String x:Key="UseLogItemDateFormat">カスタムログ日付形式</system:String>
|
||||
<system:String x:Key="LogItemDateFormatString">日付書式文字列</system:String>
|
||||
<system:String x:Key="PromptRestartForSettingsChange">変更を適用するためにすぐに再起動しますか?</system:String>
|
||||
|
||||
@@ -302,6 +302,7 @@ OF-1을 해금하지 않았다면 선택하지 말아 주세요.</system:String>
|
||||
<system:String x:Key="MinimizeToTray">트레이로 최소화</system:String>
|
||||
<system:String x:Key="SystemNotification">중요 알림 팝업</system:String>
|
||||
<system:String x:Key="HideCloseButton">닫기 버튼 숨기기</system:String>
|
||||
<system:String x:Key="WindowTitleScrollable">창 제목 스크롤</system:String>
|
||||
<system:String x:Key="UseLogItemDateFormat">사용자 정의 로그 날짜 형식</system:String>
|
||||
<system:String x:Key="LogItemDateFormatString">날짜 형식 문자열</system:String>
|
||||
<system:String x:Key="PromptRestartForSettingsChange">변경 사항을 적용을 위해 즉시 다시 시작하시겠습니까?</system:String>
|
||||
|
||||
@@ -301,6 +301,7 @@
|
||||
<system:String x:Key="MinimizeToTray">最小化时隐藏至托盘</system:String>
|
||||
<system:String x:Key="SystemNotification">重要信息弹出系统通知</system:String>
|
||||
<system:String x:Key="HideCloseButton">隐藏关闭按钮</system:String>
|
||||
<system:String x:Key="WindowTitleScrollable">窗口标题滚动</system:String>
|
||||
<system:String x:Key="UseLogItemDateFormat">自选日志日期格式</system:String>
|
||||
<system:String x:Key="LogItemDateFormatString">日期格式字符串</system:String>
|
||||
<system:String x:Key="PromptRestartForSettingsChange">是否立刻重启应用更改?</system:String>
|
||||
|
||||
@@ -301,6 +301,7 @@
|
||||
<system:String x:Key="MinimizeToTray">最小化時隱藏至工作列</system:String>
|
||||
<system:String x:Key="SystemNotification">重要訊息彈出系統通知</system:String>
|
||||
<system:String x:Key="HideCloseButton">隱藏關閉按鈕</system:String>
|
||||
<system:String x:Key="WindowTitleScrollable">窗口標題滾動</system:String>
|
||||
<system:String x:Key="UseLogItemDateFormat">自訂日誌日期格式</system:String>
|
||||
<system:String x:Key="LogItemDateFormatString">日期格式字串</system:String>
|
||||
<system:String x:Key="PromptRestartForSettingsChange">是否立刻重啟應用更改?</system:String>
|
||||
|
||||
@@ -79,6 +79,17 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
set => SetAndNotify(ref _windowTitle, value);
|
||||
}
|
||||
|
||||
private bool _windowTitleScrollable = Convert.ToBoolean(ConfigurationHelper.GetValue(ConfigurationKeys.WindowTitleScrollable, bool.FalseString));
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether to scroll the window title.
|
||||
/// </summary>
|
||||
public bool WindowTitleScrollable
|
||||
{
|
||||
get => _windowTitleScrollable;
|
||||
set => SetAndNotify(ref _windowTitleScrollable, value);
|
||||
}
|
||||
|
||||
private bool _showCloseButton = !Convert.ToBoolean(ConfigurationHelper.GetValue(ConfigurationKeys.HideCloseButton, bool.FalseString));
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -3693,6 +3693,23 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
}
|
||||
}
|
||||
|
||||
private bool _windowTitleScrollable = Convert.ToBoolean(ConfigurationHelper.GetValue(ConfigurationKeys.WindowTitleScrollable, bool.FalseString));
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether to make window title scrollable.
|
||||
/// </summary>
|
||||
public bool WindowTitleScrollable
|
||||
{
|
||||
get => _windowTitleScrollable;
|
||||
set
|
||||
{
|
||||
SetAndNotify(ref _windowTitleScrollable, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.WindowTitleScrollable, value.ToString());
|
||||
var rvm = (RootViewModel)this.Parent;
|
||||
rvm.WindowTitleScrollable = value;
|
||||
}
|
||||
}
|
||||
|
||||
private bool _hideCloseButton = Convert.ToBoolean(ConfigurationHelper.GetValue(ConfigurationKeys.HideCloseButton, bool.FalseString));
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
x:Class="MaaWpfGui.Views.UI.RootView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:c="clr-namespace:CalcBinding;assembly=CalcBinding"
|
||||
xmlns:controls="clr-namespace:MaaWpfGui.Styles.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:local="clr-namespace:MaaWpfGui.Views.UI"
|
||||
@@ -32,7 +34,15 @@
|
||||
Content="{Binding WindowTitle}"
|
||||
IsHitTestVisible="False"
|
||||
Runaway="False"
|
||||
Speed="10" />
|
||||
Speed="10"
|
||||
Visibility="{c:Binding WindowTitleScrollable}" />
|
||||
<controls:TextBlock
|
||||
Grid.Column="0"
|
||||
Margin="10,0"
|
||||
HorizontalAlignment="Left"
|
||||
IsHitTestVisible="False"
|
||||
Text="{Binding WindowTitle}"
|
||||
Visibility="{c:Binding !WindowTitleScrollable}" />
|
||||
<Button
|
||||
Grid.Column="1"
|
||||
BorderThickness="0"
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<UniformGrid
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Rows="4">
|
||||
Rows="5">
|
||||
<CheckBox
|
||||
Margin="10"
|
||||
HorizontalAlignment="Left"
|
||||
@@ -48,6 +48,12 @@
|
||||
VerticalAlignment="Center"
|
||||
Content="{DynamicResource HideCloseButton}"
|
||||
IsChecked="{Binding HideCloseButton}" />
|
||||
<CheckBox
|
||||
Margin="10"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Content="{DynamicResource WindowTitleScrollable}"
|
||||
IsChecked="{Binding WindowTitleScrollable}" />
|
||||
<CheckBox
|
||||
Margin="10"
|
||||
HorizontalAlignment="Left"
|
||||
|
||||
Reference in New Issue
Block a user