Improved TabButton.
This commit is contained in:
@@ -5,7 +5,6 @@
|
|||||||
RequestedThemeVariant="Default">
|
RequestedThemeVariant="Default">
|
||||||
<!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. -->
|
<!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. -->
|
||||||
|
|
||||||
|
|
||||||
<Application.Styles>
|
<Application.Styles>
|
||||||
<FluentTheme/>
|
<FluentTheme/>
|
||||||
<!--<DevolutionsDevExpressTheme />-->
|
<!--<DevolutionsDevExpressTheme />-->
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ namespace Progrart.Controls.TabSystem;
|
|||||||
public partial class TabButton : UserControl
|
public partial class TabButton : UserControl
|
||||||
{
|
{
|
||||||
public string? Title { get => MainButton.Content as string; set => MainButton.Content = value; }
|
public string? Title { get => MainButton.Content as string; set => MainButton.Content = value; }
|
||||||
|
public string? TooltipText { get => ToolTip.GetTip(MainButton) as string; set => ToolTip.SetTip(MainButton, value); }
|
||||||
public ITabPage page;
|
public ITabPage page;
|
||||||
public TabHost Host;
|
public TabHost Host;
|
||||||
public TabButton(ITabPage page, TabHost host)
|
public TabButton(ITabPage page, TabHost host)
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ public partial class EditorPage : UserControl, ITabPage, IEditorPage
|
|||||||
if (file is not null)
|
if (file is not null)
|
||||||
{
|
{
|
||||||
btn.Title = file.Name;
|
btn.Title = file.Name;
|
||||||
|
var path = file.TryGetLocalPath();
|
||||||
|
btn.TooltipText = path;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,6 +45,8 @@ public partial class EditorPage : UserControl, ITabPage, IEditorPage
|
|||||||
if (btn is not null)
|
if (btn is not null)
|
||||||
{
|
{
|
||||||
btn.Title = file.Name;
|
btn.Title = file.Name;
|
||||||
|
var path= file.TryGetLocalPath();
|
||||||
|
btn.TooltipText= path;
|
||||||
}
|
}
|
||||||
Task.Run(async () =>
|
Task.Run(async () =>
|
||||||
{
|
{
|
||||||
|
|||||||
8
Progrart/Pages/ProgrartEditorPage.axaml
Normal file
8
Progrart/Pages/ProgrartEditorPage.axaml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<UserControl xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
|
x:Class="Progrart.ProgrartEditorPage">
|
||||||
|
|
||||||
|
</UserControl>
|
||||||
13
Progrart/Pages/ProgrartEditorPage.axaml.cs
Normal file
13
Progrart/Pages/ProgrartEditorPage.axaml.cs
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
|
namespace Progrart;
|
||||||
|
|
||||||
|
public partial class ProgrartEditorPage : UserControl
|
||||||
|
{
|
||||||
|
public ProgrartEditorPage()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
@@ -84,6 +84,10 @@ public partial class MainView : UserControl
|
|||||||
FileContainer.Children.Add(new FileItem(folder));
|
FileContainer.Children.Add(new FileItem(folder));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
FileExplorerCloseButton.Click += (_, _) =>
|
||||||
|
{
|
||||||
|
LeftPanelToggle.IsChecked = false;
|
||||||
|
};
|
||||||
LeftPanelToggle.IsChecked = true;
|
LeftPanelToggle.IsChecked = true;
|
||||||
}
|
}
|
||||||
public void Write(string message)
|
public void Write(string message)
|
||||||
|
|||||||
Reference in New Issue
Block a user