Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Bug Fixes And New Features
Browse files Browse the repository at this point in the history
Bug Fixes:
App crashes when icon size is smaller than 5
New Features:
App Switching
Auto hide
Top Most
  • Loading branch information
HAKANKOKCU authored Jun 26, 2022
1 parent 486cc56 commit a69d7f4
Show file tree
Hide file tree
Showing 28 changed files with 340 additions and 17 deletions.
Binary file modified Budgie Dock.suo
Binary file not shown.
8 changes: 7 additions & 1 deletion Budgie Dock/BDOptions.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@
<TextBox Width="40" CharacterCasing="Normal" Text="0" Name="scolorG" MaxLength="3"></TextBox>
<TextBox Width="40" CharacterCasing="Normal" Text="0" Name="scolorB" MaxLength="3"></TextBox>
</StackPanel>
<Border CornerRadius="15" Height="30" Width="100" Background="Orange" Cursor="Hand" Name="restartapp">
<StackPanel Orientation="Horizontal">
<Label>Dock Margin Top</Label>
<TextBox Width="40" CharacterCasing="Normal" Text="0" Name="dmtop" MaxLength="3"></TextBox>
</StackPanel>
<CheckBox Name="ahd">Auto Hide Dock (Works correctly when taskbar at not bottom/hidden or its not transparent)</CheckBox>
<CheckBox Name="tpm">Forced Top Most (Restart Needed For Disabling)</CheckBox>
<Border CornerRadius="15" Height="30" Width="100" Background="Orange" Cursor="Hand" Name="restartapp">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
<Label Foreground="White">Restart</Label>
</StackPanel>
Expand Down
28 changes: 28 additions & 0 deletions Budgie Dock/BDOptions.xaml.vb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
scolorR.Text = My.Settings.separatorRed
scolorG.Text = My.Settings.SeparatorGreen
scolorB.Text = My.Settings.SeparatorBlue
ahd.IsChecked = My.Settings.autoHide
tpm.IsChecked = My.Settings.topMost
dmtop.Text = My.Settings.paddingTop
acs = True
End Sub

Expand Down Expand Up @@ -133,4 +136,29 @@
MsgBox("Please Enter A Valid Number")
End Try
End Sub

Private Sub ahd_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles ahd.Click
If acs Then
My.Settings.autoHide = ahd.IsChecked
My.Settings.Save()
End If
End Sub

Private Sub tpm_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles tpm.Click
If acs Then
My.Settings.topMost = tpm.IsChecked
My.Settings.Save()
End If
End Sub

Private Sub dmtop_TextChanged(ByVal sender As System.Object, ByVal e As System.Windows.Controls.TextChangedEventArgs) Handles dmtop.TextChanged
Try
If acs Then
My.Settings.paddingTop = dmtop.Text
My.Settings.Save()
End If
Catch ex As Exception
If Not dmtop.Text = "-" Then MsgBox("Please Enter A Valid Number")
End Try
End Sub
End Class
1 change: 1 addition & 0 deletions Budgie Dock/Budgie Dock.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="restoreAPI.vb" />
<Compile Include="Sepremover.vb" />
<Page Include="BDOptions.xaml">
<SubType>Designer</SubType>
Expand Down
5 changes: 4 additions & 1 deletion Budgie Dock/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@
</Label>
</Canvas>
<Border Name="bdr" HorizontalAlignment="Center" ClipToBounds="True" AllowDrop="True">
<StackPanel Name="appsgrid" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" AllowDrop="True" Width="0" ClipToBounds="True"></StackPanel>
<DockPanel ClipToBounds="True">
<StackPanel Name="appsgrid" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" AllowDrop="True" Width="0" ClipToBounds="True"></StackPanel>
</DockPanel>
</Border>
<StackPanel Name="isappopen" Orientation="Horizontal" Width="0" ClipToBounds="True"></StackPanel>
</StackPanel>
</Grid>
</Window>
25 changes: 23 additions & 2 deletions Budgie Dock/MainWindow.xaml.vb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Class MainWindow
Public iconlist As New ArrayList
Dim agwid = 0
Dim iddd As Integer = 0
Dim isdockhovered As Boolean = False
Public rid As Integer = 0
Private Sub Window_Loaded(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles MyBase.Loaded
ticker = New DispatcherTimer
ticker.Interval = TimeSpan.FromMilliseconds(1)
Expand Down Expand Up @@ -50,15 +52,18 @@ Class MainWindow
bdr.Background = New SolidColorBrush(Color.FromArgb((My.Settings.dockopacity / 100) * 255, My.Settings.dockRed, My.Settings.dockGreen, My.Settings.dockBlue))
bdr.CornerRadius = New CornerRadius(My.Settings.dockcr)
If My.Settings.pos = "Bottom" Then
Me.Top = Forms.Screen.PrimaryScreen.WorkingArea.Height - Me.Height + Forms.Screen.PrimaryScreen.WorkingArea.Top
Me.Top = Forms.Screen.PrimaryScreen.WorkingArea.Height - Me.Height + Forms.Screen.PrimaryScreen.WorkingArea.Top + IIf(My.Settings.autoHide, My.Settings.Size - 2, 0) + My.Settings.paddingTop
Else
Me.Left = Forms.Screen.PrimaryScreen.WorkingArea.Width - Me.Width + 180
End If
Me.Topmost = My.Settings.topMost
End Sub

Sub reicon(Optional ByVal animate As Boolean = True)
rid += 1
iddd = 0
appsgrid.Children.Clear()
isappopen.Children.Clear()
iconlist.Clear()
If My.Computer.FileSystem.ReadAllText(My.Computer.FileSystem.SpecialDirectories.MyDocuments & "\BudgieDock\Icons.data").Contains("*") Then
For Each Iconn As String In My.Computer.FileSystem.ReadAllText(My.Computer.FileSystem.SpecialDirectories.MyDocuments & "\BudgieDock\Icons.data").Split("|")
Expand All @@ -78,13 +83,17 @@ Class MainWindow
iconlist.Add("sep")
iddd += 1
a.ClipToBounds = True
Dim pp As New Grid
pp.Width = 3
isappopen.Children.Add(pp)
Else
Dim a As New iconobj
a.apppath = Iconn.Split("*")(0).Replace("{BD-STAR-}", "*").Replace("{BD-FLINE-}", "|").Split("^")(0)
a.iconpath = Iconn.Split("*")(1)
a.appname = Iconn.Split("*")(2).Replace("{BD-STAR-}", "*").Replace("{BD-FLINE-}", "|")
a.stackpanel = appsgrid
a.containerwin = Me
a.runid = rid
Try
a.apparams = Iconn.Split("*")(0).Replace("{BD-STAR-}", "*").Replace("{BD-FLINE-}", "|").Split("^")(1).Replace("{BD-UPL-}", "^")
Catch
Expand Down Expand Up @@ -123,10 +132,13 @@ Class MainWindow

Private Sub ticker_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles ticker.Tick
If My.Settings.pos = "Bottom" Then
Me.Top = Forms.Screen.PrimaryScreen.WorkingArea.Height - Me.Height + Forms.Screen.PrimaryScreen.WorkingArea.Top
Me.Top = Forms.Screen.PrimaryScreen.WorkingArea.Height - Me.Height + Forms.Screen.PrimaryScreen.WorkingArea.Top + IIf(My.Settings.autoHide And Not isdockhovered, My.Settings.Size - 2, 0) + My.Settings.paddingTop
Else
Me.Left = Forms.Screen.PrimaryScreen.WorkingArea.Width - Me.Width + 180
End If
If My.Settings.topMost Then
Me.Topmost = True
End If
'Me.WindowState = Windows.WindowState.Normal
'Me.Show()
Try
Expand Down Expand Up @@ -254,6 +266,7 @@ Class MainWindow

Private Sub animater_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles animater.Tick
appsgrid.Width += (agwid - appsgrid.Width) / My.Settings.animatescale
isappopen.Width += (agwid - isappopen.Width) / My.Settings.animatescale
Dim a As Integer = 0
Try
For Each i As UIElement In appsgrid.Children
Expand Down Expand Up @@ -312,4 +325,12 @@ Class MainWindow
savicon()
reicon()
End Sub

Private Sub bdr_MouseEnter(ByVal sender As System.Object, ByVal e As System.Windows.Input.MouseEventArgs) Handles Me.MouseEnter
isdockhovered = True
End Sub

Private Sub bdr_MouseLeave(ByVal sender As System.Object, ByVal e As System.Windows.Input.MouseEventArgs) Handles Me.MouseLeave
isdockhovered = False
End Sub
End Class
36 changes: 36 additions & 0 deletions Budgie Dock/My Project/Settings.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Budgie Dock/My Project/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,14 @@
<Setting Name="SeparatorBlue" Type="System.Byte" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="autoHide" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="topMost" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="paddingTop" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
</Settings>
</SettingsFile>
9 changes: 9 additions & 0 deletions Budgie Dock/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@
<setting name="SeparatorBlue" serializeAs="String">
<value>0</value>
</setting>
<setting name="autoHide" serializeAs="String">
<value>False</value>
</setting>
<setting name="topMost" serializeAs="String">
<value>False</value>
</setting>
<setting name="paddingTop" serializeAs="String">
<value>0</value>
</setting>
</BudgieDock.MySettings>
</userSettings>
<applicationSettings>
Expand Down
Binary file modified Budgie Dock/bin/Debug/Budgie Dock.exe
Binary file not shown.
9 changes: 9 additions & 0 deletions Budgie Dock/bin/Debug/Budgie Dock.exe.config
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@
<setting name="SeparatorBlue" serializeAs="String">
<value>0</value>
</setting>
<setting name="autoHide" serializeAs="String">
<value>False</value>
</setting>
<setting name="topMost" serializeAs="String">
<value>False</value>
</setting>
<setting name="paddingTop" serializeAs="String">
<value>0</value>
</setting>
</BudgieDock.MySettings>
</userSettings>
<applicationSettings>
Expand Down
Binary file modified Budgie Dock/bin/Debug/Budgie Dock.pdb
Binary file not shown.
9 changes: 9 additions & 0 deletions Budgie Dock/bin/Debug/Budgie Dock.vshost.exe.config
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@
<setting name="SeparatorBlue" serializeAs="String">
<value>0</value>
</setting>
<setting name="autoHide" serializeAs="String">
<value>False</value>
</setting>
<setting name="topMost" serializeAs="String">
<value>False</value>
</setting>
<setting name="paddingTop" serializeAs="String">
<value>0</value>
</setting>
</BudgieDock.MySettings>
</userSettings>
<applicationSettings>
Expand Down
Loading

0 comments on commit a69d7f4

Please sign in to comment.