Skip to content

Commit 8cb5733

Browse files
committed
Fixed minor bugs
1 parent a9b4c07 commit 8cb5733

4 files changed

Lines changed: 7 additions & 3 deletions

File tree

CutCode.CrossPlatform/DataBase/DataBaseManager.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,6 @@ public async Task<List<CodeModel>> SearchCode(string text, string from)
265265
public string ExportData(string path)
266266
{
267267
if (Path.GetExtension(path) != ".whl") return "This type of file is not supported!";
268-
_db.Close();
269268
try
270269
{
271270
File.Copy(dbpath, path);

CutCode.CrossPlatform/ViewModels/AddViewModel.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ public AddViewModel()
4646
Cells.CollectionChanged += (sender, args) =>
4747
{
4848
IsCellEmpty = Cells.Count == 0;
49-
5049
};
5150
}
5251

CutCode.CrossPlatform/Views/AddView.axaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
<Style Selector="Button:pressed /template/ ContentPresenter, Button:pointerover /template/ ContentPresenter">
2121
<Setter Property="Background" Value="{TemplateBinding BorderBrush}"/>
2222
</Style>
23+
24+
<Style Selector="Button:disabled /template/ ContentPresenter#PART_ContentPresenter">
25+
<Setter Property="Opacity" Value="0.35"/>
26+
<Setter Property="Background" Value="Transparent"/>
27+
</Style>
2328
</UserControl.Styles>
2429

2530
<UserControl.Background>
@@ -125,6 +130,7 @@
125130
Foreground="{Binding TextAreaForeground, Converter={StaticResource ColorToBrushConverter}}"
126131
BorderBrush="{Binding TextAreaOverlayBackground, Converter={StaticResource ColorToBrushConverter}}"
127132
Margin="3,0,8,0"
133+
IsEnabled="{Binding !IsCellEmpty}"
128134
Command="{Binding Save}"
129135
BorderThickness="0"
130136
Width="100" Height="30">

CutCode.CrossPlatform/Views/MainWindow.axaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
MinHeight="500" MinWidth="750"
1313
d:DesignHeight="570" d:DesignWidth="800"
1414
x:Class="CutCode.CrossPlatform.Views.MainWindow"
15-
Icon="/Assets/avalonia-logo.ico"
15+
Icon="/Assets/Images/logo.ico"
1616
Title="CutCode"
1717
BorderThickness="0"
1818
BorderBrush="Transparent"

0 commit comments

Comments
 (0)