diff options
| author | EverythingWindows <[email protected]> | 2022-11-24 21:26:45 +0700 |
|---|---|---|
| committer | EverythingWindows <[email protected]> | 2022-11-24 21:26:45 +0700 |
| commit | 9754f495672581abd7098c39027b512525b5f9ab (patch) | |
| tree | 60ea20826d7743f25b49be9254373b1e7f9cbee3 /ShiftOS-TheRevival/MainForms/Applications/DuWM | |
| parent | a594d38810939c8afbf0e12fb970d8aa3fd880e5 (diff) | |
| download | shiftos-therevival-old-9754f495672581abd7098c39027b512525b5f9ab.tar.gz shiftos-therevival-old-9754f495672581abd7098c39027b512525b5f9ab.tar.bz2 shiftos-therevival-old-9754f495672581abd7098c39027b512525b5f9ab.zip | |
Fully functional and partially working Shifter
Diffstat (limited to 'ShiftOS-TheRevival/MainForms/Applications/DuWM')
4 files changed, 57 insertions, 2 deletions
diff --git a/ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/Categories/DuWM_Shifter_Desktop.Designer.vb b/ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/Categories/DuWM_Shifter_Desktop.Designer.vb index 849c215..f316a71 100644 --- a/ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/Categories/DuWM_Shifter_Desktop.Designer.vb +++ b/ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/Categories/DuWM_Shifter_Desktop.Designer.vb @@ -39,12 +39,13 @@ Partial Class DuWM_Shifter_Desktop ' 'cmb_DesktopColor ' + Me.cmb_DesktopColor.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed Me.cmb_DesktopColor.Font = New System.Drawing.Font("Segoe UI", 12.0!) Me.cmb_DesktopColor.FormattingEnabled = True Me.cmb_DesktopColor.Items.AddRange(New Object() {"Black", "Dark Gray", "Light Gray", "Red", "Dark Red", "Green", "Light Green", "Blue", "Dark Blue", "Yellow", "Dark Yellow", "Purple", "Light Purple", "Aqua", "Light Aqua", "White"}) Me.cmb_DesktopColor.Location = New System.Drawing.Point(156, 91) Me.cmb_DesktopColor.Name = "cmb_DesktopColor" - Me.cmb_DesktopColor.Size = New System.Drawing.Size(121, 29) + Me.cmb_DesktopColor.Size = New System.Drawing.Size(121, 30) Me.cmb_DesktopColor.TabIndex = 1 ' 'Label1 diff --git a/ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/Categories/DuWM_Shifter_Desktop.vb b/ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/Categories/DuWM_Shifter_Desktop.vb index 6a476e2..d7f5b26 100644 --- a/ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/Categories/DuWM_Shifter_Desktop.vb +++ b/ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/Categories/DuWM_Shifter_Desktop.vb @@ -3,8 +3,46 @@ CheckAvailability() End Sub - Private Sub CheckAvailability() + Private Sub cmb_DesktopColor_DrawItem(ByVal sender As Object, ByVal e As System.Windows.Forms.DrawItemEventArgs) Handles cmb_DesktopColor.DrawItem + e.DrawBackground() + If (e.State And DrawItemState.Selected) = DrawItemState.Selected Then + e.Graphics.FillRectangle(Brushes.Black, e.Bounds) + End If + Dim sf As New StringFormat + Using b As New SolidBrush(e.ForeColor) + e.Graphics.DrawString(cmb_DesktopColor.GetItemText(cmb_DesktopColor.Items(e.Index)), e.Font, b, e.Bounds, sf) + End Using + e.DrawFocusRectangle() + End Sub + Private Sub CheckAvailability() + If Strings.AvailableFeature(40) = 1 Then + cmb_DesktopColor.Items.Remove("Yellow") + cmb_DesktopColor.Items.Remove("Dark Yellow") + cmb_DesktopColor.Items.Remove("Purple") + cmb_DesktopColor.Items.Remove("Light Purple") + cmb_DesktopColor.Items.Remove("Aqua") + cmb_DesktopColor.Items.Remove("Light Aqua") + ElseIf Strings.AvailableFeature(40) = 3 Then + If Strings.AvailableFeature(41) = 1 Then + 'NOTHING + Else + 'NOTHING + End If + Else + cmb_DesktopColor.Items.Remove("Red") + cmb_DesktopColor.Items.Remove("Dark Red") + cmb_DesktopColor.Items.Remove("Green") + cmb_DesktopColor.Items.Remove("Light Green") + cmb_DesktopColor.Items.Remove("Blue") + cmb_DesktopColor.Items.Remove("Dark Blue") + cmb_DesktopColor.Items.Remove("Yellow") + cmb_DesktopColor.Items.Remove("Dark Yellow") + cmb_DesktopColor.Items.Remove("Purple") + cmb_DesktopColor.Items.Remove("Light Purple") + cmb_DesktopColor.Items.Remove("Aqua") + cmb_DesktopColor.Items.Remove("Light Aqua") + End If End Sub Private Sub cmb_DesktopColor_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cmb_DesktopColor.SelectedIndexChanged diff --git a/ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/DuWM_Shifter.Designer.vb b/ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/DuWM_Shifter.Designer.vb index a117dfc..97cb13b 100644 --- a/ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/DuWM_Shifter.Designer.vb +++ b/ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/DuWM_Shifter.Designer.vb @@ -49,6 +49,7 @@ Partial Class DuWM_Shifter Me.lst_Features.BackColor = System.Drawing.Color.Silver Me.lst_Features.BorderStyle = System.Windows.Forms.BorderStyle.None Me.lst_Features.Dock = System.Windows.Forms.DockStyle.Bottom + Me.lst_Features.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed Me.lst_Features.Font = New System.Drawing.Font("Segoe UI", 12.0!) Me.lst_Features.FormattingEnabled = True Me.lst_Features.ItemHeight = 21 @@ -84,6 +85,7 @@ Partial Class DuWM_Shifter ' Me.Button3.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.Button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.Button3.Font = New System.Drawing.Font("Segoe UI", 8.25!) Me.Button3.ForeColor = System.Drawing.Color.White Me.Button3.Location = New System.Drawing.Point(351, 10) Me.Button3.Name = "Button3" @@ -96,6 +98,7 @@ Partial Class DuWM_Shifter ' Me.btn_Close.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.btn_Close.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.btn_Close.Font = New System.Drawing.Font("Segoe UI", 8.25!) Me.btn_Close.ForeColor = System.Drawing.Color.White Me.btn_Close.Location = New System.Drawing.Point(432, 10) Me.btn_Close.Name = "btn_Close" @@ -108,6 +111,7 @@ Partial Class DuWM_Shifter ' Me.Button1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.Button1.Font = New System.Drawing.Font("Segoe UI", 8.25!) Me.Button1.ForeColor = System.Drawing.Color.White Me.Button1.Location = New System.Drawing.Point(513, 10) Me.Button1.Name = "Button1" diff --git a/ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/DuWM_Shifter.vb b/ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/DuWM_Shifter.vb index 55f0e41..06b35c6 100644 --- a/ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/DuWM_Shifter.vb +++ b/ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/DuWM_Shifter.vb @@ -8,6 +8,18 @@ End Sub + Private Sub lst_Features_DrawItem(ByVal sender As Object, ByVal e As System.Windows.Forms.DrawItemEventArgs) Handles lst_Features.DrawItem + e.DrawBackground() + If (e.State And DrawItemState.Selected) = DrawItemState.Selected Then + e.Graphics.FillRectangle(Brushes.Black, e.Bounds) + End If + Dim sf As New StringFormat + Using b As New SolidBrush(e.ForeColor) + e.Graphics.DrawString(lst_Features.GetItemText(lst_Features.Items(e.Index)), e.Font, b, e.Bounds, sf) + End Using + e.DrawFocusRectangle() + End Sub + Private Sub btn_Close_Click(sender As Object, e As EventArgs) Handles btn_Close.Click Close() End Sub |
