diff --git a/App.xojo_code b/App.xojo_code index 3ebc03a..c1fed1d 100644 --- a/App.xojo_code +++ b/App.xojo_code @@ -22,6 +22,30 @@ Inherits DesktopApplication #tag EndProperty + #tag Constant, Name = Color_DarkMode_Green1, Type = Color, Dynamic = False, Default = \"&c008F00", Scope = Public + #tag EndConstant + + #tag Constant, Name = Color_DarkMode_Green2, Type = Color, Dynamic = False, Default = \"&c388F38", Scope = Public + #tag EndConstant + + #tag Constant, Name = Color_DarkMode_Red1, Type = Color, Dynamic = False, Default = \"&c942B1D", Scope = Public + #tag EndConstant + + #tag Constant, Name = Color_DarkMode_Red2, Type = Color, Dynamic = False, Default = \"&c94453B", Scope = Public + #tag EndConstant + + #tag Constant, Name = Color_LightMode_Green1, Type = Color, Dynamic = False, Default = \"&c73FA79", Scope = Public + #tag EndConstant + + #tag Constant, Name = Color_LightMode_Green2, Type = Color, Dynamic = False, Default = \"&cC8FACA", Scope = Public + #tag EndConstant + + #tag Constant, Name = Color_LightMode_Red1, Type = Color, Dynamic = False, Default = \"&cFF7E79", Scope = Public + #tag EndConstant + + #tag Constant, Name = Color_LightMode_Red2, Type = Color, Dynamic = False, Default = \"&cFFCDCB", Scope = Public + #tag EndConstant + #tag Constant, Name = kEditClear, Type = String, Dynamic = False, Default = \"&Delete", Scope = Public #Tag Instance, Platform = Windows, Language = Default, Definition = \"&Delete" #Tag Instance, Platform = Linux, Language = Default, Definition = \"&Delete" diff --git a/Container_Keyword.xojo_window b/Container_Keyword.xojo_window index 9cf031d..323124b 100644 --- a/Container_Keyword.xojo_window +++ b/Container_Keyword.xojo_window @@ -54,111 +54,75 @@ Begin DesktopContainer Container_Keyword Top = 0 Transparent = False Visible = True - Width = 304 + Width = 284 _mIndex = 0 _mInitialParent = "" _mName = "" _mPanelIndex = 0 End - Begin DesktopBevelButton BevelButton_Save_Keyword - Active = False + Begin PushButton BevelButton_Save_Keyword AllowAutoDeactivate= True - AllowFocus = True - AllowTabStop = True - BackgroundColor = &c00000000 - BevelStyle = 1 Bold = False - ButtonStyle = 0 - Caption = "" - CaptionAlignment= 3 - CaptionDelta = 0 - CaptionPosition = 1 + Cancel = False + Caption = "💾" + Default = False Enabled = True FontName = "System" FontSize = 0.0 FontUnit = 0 - HasBackgroundColor= False - Height = 22 - Icon = 1088702463 - IconAlignment = 1 - IconDeltaX = 0 - IconDeltaY = 0 + Height = 20 Index = -2147483648 InitialParent = "" Italic = False - Left = 316 + Left = 296 LockBottom = False LockedInPosition= False LockLeft = False LockRight = True LockTop = True - MenuStyle = 0 - PanelIndex = 0 + MacButtonStyle = 0 Scope = 2 TabIndex = 1 TabPanelIndex = 0 - TextColor = &c00000000 + TabStop = True Tooltip = "Save the text entered in the prompt filter as new keyword, in the selected category." Top = 0 Transparent = False Underline = False - Value = False Visible = True - Width = 22 - _mIndex = 0 - _mInitialParent = "" - _mName = "" - _mPanelIndex = 0 + Width = 32 End - Begin DesktopBevelButton BevelButton_Delete_Keyword - Active = False + Begin PushButton BevelButton_Delete_Keyword AllowAutoDeactivate= True - AllowFocus = True - AllowTabStop = True - BackgroundColor = &c00000000 - BevelStyle = 1 Bold = False - ButtonStyle = 0 - Caption = "" - CaptionAlignment= 3 - CaptionDelta = 0 - CaptionPosition = 1 + Cancel = False + Caption = "🗑️" + Default = False Enabled = True FontName = "System" FontSize = 0.0 FontUnit = 0 - HasBackgroundColor= False - Height = 22 - Icon = 28030975 - IconAlignment = 1 - IconDeltaX = 0 - IconDeltaY = 0 + Height = 20 Index = -2147483648 InitialParent = "" Italic = False - Left = 350 + Left = 340 LockBottom = False LockedInPosition= False LockLeft = False LockRight = True LockTop = True - MenuStyle = 0 - PanelIndex = 0 + MacButtonStyle = 0 Scope = 2 TabIndex = 2 TabPanelIndex = 0 - TextColor = &c00000000 + TabStop = True Tooltip = "Delete the keyword marked in the list below from the database." Top = 0 Transparent = False Underline = False - Value = False Visible = True - Width = 22 - _mIndex = 0 - _mInitialParent = "" - _mName = "" - _mPanelIndex = 0 + Width = 32 End Begin DesktopPopupMenu PopupMenu_Category AllowAutoDeactivate= True @@ -189,7 +153,7 @@ Begin DesktopContainer Container_Keyword Visible = True Width = 180 End - Begin DesktopListBox ListBox_PromptWords + Begin DesktopListBoxDM ListBox_PromptWords AllowAutoDeactivate= True AllowAutoHideScrollbars= True AllowExpandableRows= False @@ -222,6 +186,7 @@ Begin DesktopContainer Container_Keyword LockLeft = True LockRight = True LockTop = True + NegativeColumn = 3 RequiresSelection= True RowSelectionType= 1 Scope = 2 @@ -316,29 +281,17 @@ Begin DesktopContainer Container_Keyword Visible = True Width = 278 End - Begin DesktopBevelButton BevelButton_Copy_PromptPositive - Active = False + Begin PushButton BevelButton_Copy_PromptPositive AllowAutoDeactivate= True - AllowFocus = True - AllowTabStop = True - BackgroundColor = &c00000000 - BevelStyle = 1 Bold = False - ButtonStyle = 0 + Cancel = False Caption = "Copy positive prompt" - CaptionAlignment= 3 - CaptionDelta = 0 - CaptionPosition = 1 + Default = False Enabled = True FontName = "System" FontSize = 0.0 FontUnit = 0 - HasBackgroundColor= False Height = 22 - Icon = 1229443071 - IconAlignment = 3 - IconDeltaX = 0 - IconDeltaY = 0 Index = -2147483648 InitialParent = "" Italic = False @@ -348,23 +301,17 @@ Begin DesktopContainer Container_Keyword LockLeft = True LockRight = False LockTop = False - MenuStyle = 0 - PanelIndex = 0 + MacButtonStyle = 0 Scope = 2 TabIndex = 7 TabPanelIndex = 0 - TextColor = &c00000000 + TabStop = True Tooltip = "Copy the text above this button to the clipboard so you can paste it elsewhere." Top = 464 Transparent = False Underline = False - Value = False Visible = True Width = 278 - _mIndex = 0 - _mInitialParent = "" - _mName = "" - _mPanelIndex = 0 End Begin DesktopTextArea TextArea_PromptNegative AllowAutoDeactivate= True @@ -445,29 +392,17 @@ Begin DesktopContainer Container_Keyword Visible = True Width = 272 End - Begin DesktopBevelButton BevelButton_Copy_PromptNegative - Active = False + Begin PushButton BevelButton_Copy_PromptNegative AllowAutoDeactivate= True - AllowFocus = True - AllowTabStop = True - BackgroundColor = &c00000000 - BevelStyle = 1 Bold = False - ButtonStyle = 0 + Cancel = False Caption = "Copy negative prompt" - CaptionAlignment= 3 - CaptionDelta = 0 - CaptionPosition = 1 + Default = False Enabled = True FontName = "System" FontSize = 0.0 FontUnit = 0 - HasBackgroundColor= False Height = 22 - Icon = 1229443071 - IconAlignment = 3 - IconDeltaX = 0 - IconDeltaY = 0 Index = -2147483648 InitialParent = "" Italic = False @@ -477,23 +412,17 @@ Begin DesktopContainer Container_Keyword LockLeft = False LockRight = True LockTop = False - MenuStyle = 0 - PanelIndex = 0 + MacButtonStyle = 0 Scope = 2 TabIndex = 10 TabPanelIndex = 0 - TextColor = &c00000000 + TabStop = True Tooltip = "Copy the text above this button to the clipboard so you can paste it elsewhere." Top = 464 Transparent = False Underline = False - Value = False Visible = True Width = 272 - _mIndex = 0 - _mInitialParent = "" - _mName = "" - _mPanelIndex = 0 End End #tag EndDesktopWindow @@ -833,14 +762,14 @@ End #tag EndEvents #tag Events BevelButton_Save_Keyword #tag Event - Sub Pressed() + Sub Action() Keyword_Save End Sub #tag EndEvent #tag EndEvents #tag Events BevelButton_Delete_Keyword #tag Event - Sub Pressed() + Sub Action() Keyword_Delete End Sub #tag EndEvent @@ -930,24 +859,6 @@ End End Select End Function #tag EndEvent - #tag Event - Function PaintCellBackground(g As Graphics, row As Integer, column As Integer) As Boolean - If row<0 Or row>Me.LastRowIndex Then Return False - - If Me.CellCheckBoxValueAt(row,3) Then - - g.DrawingColor=&cFFECEC00 - - Else - - g.DrawingColor=&cE8FFE800 - - - End If - - g.FillRectangle(0,0,g.Width,g.Height) - End Function - #tag EndEvent #tag Event Sub DoublePressed() If Not Me.CellCheckBoxValueAt(Me.SelectedRowIndex,0) Then Return @@ -1016,7 +927,7 @@ End #tag EndEvents #tag Events BevelButton_Copy_PromptPositive #tag Event - Sub Pressed() + Sub Action() Var c As New Clipboard c.Text = TextArea_PromptPositive.Text.Trim End Sub @@ -1031,7 +942,7 @@ End #tag EndEvents #tag Events BevelButton_Copy_PromptNegative #tag Event - Sub Pressed() + Sub Action() Var c As New Clipboard c.Text = TextArea_PromptNegative.Text.Trim End Sub diff --git a/Container_Preset.xojo_window b/Container_Preset.xojo_window index 6fb648c..2cd76a5 100644 --- a/Container_Preset.xojo_window +++ b/Container_Preset.xojo_window @@ -96,109 +96,73 @@ Begin DesktopContainer Container_Preset Underline = False ValidationMask = "" Visible = True - Width = 184 + Width = 164 End - Begin DesktopBevelButton BevelButton_Save_Preset - Active = False + Begin PushButton BevelButton_Save_Preset AllowAutoDeactivate= True - AllowFocus = True - AllowTabStop = True - BackgroundColor = &c00000000 - BevelStyle = 1 Bold = False - ButtonStyle = 0 - Caption = "" - CaptionAlignment= 3 - CaptionDelta = 0 - CaptionPosition = 1 + Cancel = False + Caption = "💾" + Default = False Enabled = True FontName = "System" FontSize = 0.0 FontUnit = 0 - HasBackgroundColor= False - Height = 22 - Icon = 1088702463 - IconAlignment = 1 - IconDeltaX = 0 - IconDeltaY = 0 + Height = 20 Index = -2147483648 InitialParent = "" Italic = False - Left = 258 + Left = 238 LockBottom = False LockedInPosition= False LockLeft = False LockRight = True LockTop = True - MenuStyle = 0 - PanelIndex = 0 + MacButtonStyle = 0 Scope = 2 TabIndex = 2 TabPanelIndex = 0 - TextColor = &c00000000 + TabStop = True Tooltip = "Save the currently selected keywords as a new preset under the name entered on the left.\r\n\r\nIf you change the name shown at left of a previously selected preset, the preset will be saved as a new preset with the new name." Top = 0 Transparent = False Underline = False - Value = False Visible = True - Width = 22 - _mIndex = 0 - _mInitialParent = "" - _mName = "" - _mPanelIndex = 0 + Width = 32 End - Begin DesktopBevelButton BevelButton_Delete_Preset - Active = False + Begin PushButton BevelButton_Delete_Preset AllowAutoDeactivate= True - AllowFocus = True - AllowTabStop = True - BackgroundColor = &c00000000 - BevelStyle = 1 Bold = False - ButtonStyle = 0 - Caption = "" - CaptionAlignment= 3 - CaptionDelta = 0 - CaptionPosition = 1 + Cancel = False + Caption = "🗑️" + Default = False Enabled = True FontName = "System" FontSize = 0.0 FontUnit = 0 - HasBackgroundColor= False - Height = 22 - Icon = 28030975 - IconAlignment = 1 - IconDeltaX = 0 - IconDeltaY = 0 + Height = 20 Index = -2147483648 InitialParent = "" Italic = False - Left = 292 + Left = 282 LockBottom = False LockedInPosition= False LockLeft = False LockRight = True LockTop = True - MenuStyle = 0 - PanelIndex = 0 + MacButtonStyle = 0 Scope = 2 TabIndex = 3 TabPanelIndex = 0 - TextColor = &c00000000 + TabStop = True Tooltip = "Delete the current preset." Top = 0 Transparent = False Underline = False - Value = False Visible = True - Width = 22 - _mIndex = 0 - _mInitialParent = "" - _mName = "" - _mPanelIndex = 0 + Width = 32 End - Begin DesktopListBox ListBox_Presets + Begin DesktopListBoxDM ListBox_Presets AllowAutoDeactivate= True AllowAutoHideScrollbars= True AllowExpandableRows= False @@ -231,6 +195,7 @@ Begin DesktopContainer Container_Preset LockLeft = True LockRight = True LockTop = True + NegativeColumn = 3 RequiresSelection= True RowSelectionType= 0 Scope = 2 @@ -273,7 +238,7 @@ Begin DesktopContainer Container_Preset Top = 206 Transparent = False Underline = False - Value = 1 + Value = 0 Visible = True Width = 314 Begin DesktopCanvas Canvas_Sample @@ -632,7 +597,7 @@ Begin DesktopContainer Container_Preset AllowSpellChecking= True AllowStyledText = True AllowTabs = False - BackgroundColor = &cF8EAC000 + BackgroundColor = &cFFFFFF00 Bold = False Enabled = True FontName = "System" @@ -844,14 +809,14 @@ End #tag EndEvents #tag Events BevelButton_Save_Preset #tag Event - Sub Pressed() + Sub Action() Preset_Save End Sub #tag EndEvent #tag EndEvents #tag Events BevelButton_Delete_Preset #tag Event - Sub Pressed() + Sub Action() Preset_Delete End Sub #tag EndEvent @@ -891,15 +856,32 @@ End If CurrentPreset=Nil Or CurrentPreset.Sample=Nil Then - #If TargetWindows Then - g.DrawingColor=&cFFFFFF00 - #Else - g.DrawingColor=&cE4E4E400 - #EndIf - g.FillRectangle(0,0,g.Width,g.Height) - g.DrawingColor=&cB6B6B600 - g.DrawRectangle(0,0,g.Width,g.Height) - g.DrawingColor = &c99999900 + If Color.IsDarkMode Then + + #If TargetWindows Then + g.DrawingColor=&c21212100 + #Else + g.DrawingColor=&c2F2F2E00 + #EndIf + g.FillRectangle(0,0,g.Width,g.Height) + g.DrawingColor=&c43434300 + g.DrawRectangle(0,0,g.Width,g.Height) + g.DrawingColor = &cA9A9A900 + + Else + + #If TargetWindows Then + g.DrawingColor=&cFFFFFF00 + #Else + g.DrawingColor=&cE4E4E400 + #EndIf + g.FillRectangle(0,0,g.Width,g.Height) + g.DrawingColor=&cB6B6B600 + g.DrawRectangle(0,0,g.Width,g.Height) + g.DrawingColor = &c99999900 + + End If + g.Bold = True If g.WidthMe.LastRowIndex Then Return False + + If row Mod 2 = 0 Then + + If Color.IsDarkMode Then + + g.DrawingColor = &c19191900 + + Else + + g.DrawingColor = &cEBEBEB00 + + End If + + g.FillRectangle(0,0,g.Width,g.Height) + + End If + + If Me.CellCheckBoxValueAt(row,0) Then + + If row Mod 2 = 0 Then + + If Color.IsDarkMode Then + + g.DrawingColor=App.Color_DarkMode_Green1 + + Else + + g.DrawingColor=App.Color_LightMode_Green1 + + End If + + Else + + If Color.IsDarkMode Then + + g.DrawingColor=App.Color_DarkMode_Green2 + + Else + + g.DrawingColor=App.Color_LightMode_Green2 + + End If + + End If + + g.FillRectangle(0,0,g.Width,g.Height) + + End If + + If Me.CellCheckBoxValueAt(row,Self.NegativeColumn) Then + + If row Mod 2 = 0 Then + + If Color.IsDarkMode Then + + g.DrawingColor=App.Color_DarkMode_Red1 + + Else + + g.DrawingColor=app.Color_LightMode_Red1 + + End If + + Else + + If Color.IsDarkMode Then + + g.DrawingColor=App.Color_DarkMode_Red2 + + Else + + g.DrawingColor=App.Color_LightMode_Red2 + + End If + + End If + + g.FillRectangle(0,0,g.Width,g.Height) + + End If + + Var b As Boolean + b = RaiseEvent PaintCellBackground(g, row, column) + End Function + #tag EndEvent + + + #tag Hook, Flags = &h0 + Event PaintCellBackground(g As Graphics, row As Integer, column As Integer) As Boolean + #tag EndHook + + + #tag Property, Flags = &h0 + NegativeColumn As Integer = 3 + #tag EndProperty + + + #tag ViewBehavior + #tag ViewProperty + Name="Name" + Visible=true + Group="ID" + InitialValue="" + Type="String" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="Index" + Visible=true + Group="ID" + InitialValue="" + Type="Integer" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="Super" + Visible=true + Group="ID" + InitialValue="" + Type="String" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="Left" + Visible=true + Group="Position" + InitialValue="0" + Type="Integer" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="Top" + Visible=true + Group="Position" + InitialValue="0" + Type="Integer" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="Width" + Visible=true + Group="Position" + InitialValue="100" + Type="Integer" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="Height" + Visible=true + Group="Position" + InitialValue="100" + Type="Integer" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="LockLeft" + Visible=true + Group="Position" + InitialValue="True" + Type="Boolean" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="LockTop" + Visible=true + Group="Position" + InitialValue="True" + Type="Boolean" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="LockRight" + Visible=true + Group="Position" + InitialValue="False" + Type="Boolean" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="LockBottom" + Visible=true + Group="Position" + InitialValue="False" + Type="Boolean" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="TabIndex" + Visible=true + Group="Position" + InitialValue="0" + Type="Integer" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="TabStop" + Visible=true + Group="Position" + InitialValue="True" + Type="Boolean" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="AllowAutoDeactivate" + Visible=true + Group="Appearance" + InitialValue="True" + Type="Boolean" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="HasBorder" + Visible=true + Group="Appearance" + InitialValue="True" + Type="Boolean" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="ColumnCount" + Visible=true + Group="Appearance" + InitialValue="1" + Type="Integer" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="ColumnWidths" + Visible=true + Group="Appearance" + InitialValue="" + Type="String" + EditorType="MultiLineEditor" + #tag EndViewProperty + #tag ViewProperty + Name="DefaultRowHeight" + Visible=true + Group="Appearance" + InitialValue="-1" + Type="Integer" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="Enabled" + Visible=true + Group="Appearance" + InitialValue="True" + Type="Boolean" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="GridLineStyle" + Visible=true + Group="Appearance" + InitialValue="0" + Type="GridLineStyles" + EditorType="Enum" + #tag EnumValues + "0 - None" + "1 - Horizontal" + "2 - Vertical" + "3 - Both" + #tag EndEnumValues + #tag EndViewProperty + #tag ViewProperty + Name="HasHeader" + Visible=true + Group="Appearance" + InitialValue="True" + Type="Boolean" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="HeadingIndex" + Visible=true + Group="Appearance" + InitialValue="-1" + Type="Integer" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="Tooltip" + Visible=true + Group="Appearance" + InitialValue="" + Type="String" + EditorType="MultiLineEditor" + #tag EndViewProperty + #tag ViewProperty + Name="InitialValue" + Visible=true + Group="Appearance" + InitialValue="" + Type="String" + EditorType="MultiLineEditor" + #tag EndViewProperty + #tag ViewProperty + Name="HasHorizontalScrollbar" + Visible=true + Group="Appearance" + InitialValue="False" + Type="Boolean" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="HasVerticalScrollbar" + Visible=true + Group="Appearance" + InitialValue="True" + Type="Boolean" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="DropIndicatorVisible" + Visible=true + Group="Appearance" + InitialValue="False" + Type="Boolean" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="Transparent" + Visible=true + Group="Appearance" + InitialValue="False" + Type="Boolean" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="AllowFocusRing" + Visible=true + Group="Appearance" + InitialValue="True" + Type="Boolean" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="Visible" + Visible=true + Group="Appearance" + InitialValue="True" + Type="Boolean" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="AllowAutoHideScrollbars" + Visible=true + Group="Behavior" + InitialValue="True" + Type="Boolean" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="AllowResizableColumns" + Visible=true + Group="Behavior" + InitialValue="False" + Type="Boolean" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="AllowRowDragging" + Visible=true + Group="Behavior" + InitialValue="False" + Type="Boolean" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="AllowRowReordering" + Visible=true + Group="Behavior" + InitialValue="False" + Type="Boolean" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="AllowExpandableRows" + Visible=true + Group="Behavior" + InitialValue="False" + Type="Boolean" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="RequiresSelection" + Visible=true + Group="Behavior" + InitialValue="False" + Type="Boolean" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="RowSelectionType" + Visible=true + Group="Behavior" + InitialValue="0" + Type="RowSelectionTypes" + EditorType="Enum" + #tag EnumValues + "0 - Single" + "1 - Multiple" + #tag EndEnumValues + #tag EndViewProperty + #tag ViewProperty + Name="NegativeColumn" + Visible=true + Group="Behavior" + InitialValue="3" + Type="Integer" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="Bold" + Visible=true + Group="Font" + InitialValue="False" + Type="Boolean" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="Italic" + Visible=true + Group="Font" + InitialValue="False" + Type="Boolean" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="FontName" + Visible=true + Group="Font" + InitialValue="System" + Type="String" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="FontSize" + Visible=true + Group="Font" + InitialValue="0" + Type="Single" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="FontUnit" + Visible=true + Group="Font" + InitialValue="0" + Type="FontUnits" + EditorType="Enum" + #tag EnumValues + "0 - Default" + "1 - Pixel" + "2 - Point" + "3 - Inch" + "4 - Millimeter" + #tag EndEnumValues + #tag EndViewProperty + #tag ViewProperty + Name="Underline" + Visible=true + Group="Font" + InitialValue="False" + Type="Boolean" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="TabPanelIndex" + Visible=false + Group="Position" + InitialValue="0" + Type="Integer" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="_ScrollOffset" + Visible=false + Group="Appearance" + InitialValue="0" + Type="Integer" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="_ScrollWidth" + Visible=false + Group="Appearance" + InitialValue="-1" + Type="Integer" + EditorType="" + #tag EndViewProperty + #tag EndViewBehavior +End Class +#tag EndClass diff --git a/SDP.xojo_project b/SDP.xojo_project index 4603be4..0d3f49b 100644 --- a/SDP.xojo_project +++ b/SDP.xojo_project @@ -23,6 +23,7 @@ MultiImage=Symbol_16px_Copy;Images/Symbol_16px_Copy.xojo_image;&h000000004947CFF MultiImage=Symbol_16px_Save;Images/Symbol_16px_Save.xojo_image;&h0000000040E447FF;&h000000007F639FFF;false MultiImage=Symbol_16px_Add;Images/Symbol_16px_Add.xojo_image;&h00000000794927FF;&h000000007F639FFF;false MultiImage=Symbol_16px_Down;Images/Symbol_16px_Down.xojo_image;&h0000000061F7E7FF;&h000000007F639FFF;false +Class=DesktopListBoxDM;DesktopListBoxDM.xojo_code;&h00000000623BD7FF;&h0000000000000000;false DefaultWindow=Window_Main AppMenuBar=MenuBar_Main MajorVersion=1 @@ -55,6 +56,7 @@ DebuggerCommandLine= UseGDIPlus=False UseBuildsFolder=True HiDPI=True +DarkMode=True CopyRedistNextToWindowsEXE=False IncludePDB=False IsWebProject=False diff --git a/Window_Model.xojo_window b/Window_Model.xojo_window index 51d6323..5da129f 100644 --- a/Window_Model.xojo_window +++ b/Window_Model.xojo_window @@ -278,29 +278,17 @@ Begin DesktopWindow Window_Model Visible = True Width = 348 End - Begin DesktopBevelButton BevelButton_Delete - Active = False + Begin PushButton BevelButton_Delete AllowAutoDeactivate= True - AllowFocus = True - AllowTabStop = True - BackgroundColor = &c00000000 - BevelStyle = 1 Bold = False - ButtonStyle = 0 + Cancel = False Caption = "Delete Model" - CaptionAlignment= 3 - CaptionDelta = 0 - CaptionPosition = 1 + Default = False Enabled = True FontName = "System" FontSize = 0.0 FontUnit = 0 - HasBackgroundColor= False Height = 22 - Icon = 28030975 - IconAlignment = 0 - IconDeltaX = 0 - IconDeltaY = 0 Index = -2147483648 InitialParent = "" Italic = False @@ -310,47 +298,29 @@ Begin DesktopWindow Window_Model LockLeft = False LockRight = True LockTop = False - MenuStyle = 0 - PanelIndex = 0 + MacButtonStyle = 0 Scope = 2 TabIndex = 8 TabPanelIndex = 0 - TextColor = &c00000000 + TabStop = True Tooltip = "" Top = 358 Transparent = False Underline = False - Value = False Visible = True Width = 120 - _mIndex = 0 - _mInitialParent = "" - _mName = "" - _mPanelIndex = 0 End - Begin DesktopBevelButton BevelButton_Save - Active = False + Begin PushButton BevelButton_Save AllowAutoDeactivate= True - AllowFocus = True - AllowTabStop = True - BackgroundColor = &c00000000 - BevelStyle = 1 Bold = False - ButtonStyle = 0 + Cancel = False Caption = "Save Model" - CaptionAlignment= 3 - CaptionDelta = 0 - CaptionPosition = 1 + Default = False Enabled = True FontName = "System" FontSize = 0.0 FontUnit = 0 - HasBackgroundColor= False Height = 22 - Icon = 1088702463 - IconAlignment = 0 - IconDeltaX = 0 - IconDeltaY = 0 Index = -2147483648 InitialParent = "" Italic = False @@ -360,23 +330,17 @@ Begin DesktopWindow Window_Model LockLeft = False LockRight = True LockTop = False - MenuStyle = 0 - PanelIndex = 0 + MacButtonStyle = 0 Scope = 2 TabIndex = 9 TabPanelIndex = 0 - TextColor = &c00000000 + TabStop = True Tooltip = "" Top = 324 Transparent = False Underline = False - Value = False Visible = True Width = 120 - _mIndex = 0 - _mInitialParent = "" - _mName = "" - _mPanelIndex = 0 End Begin DesktopLabel Label_ModelInfo AllowAutoDeactivate= True @@ -416,7 +380,7 @@ Begin DesktopWindow Window_Model AllowSpellChecking= True AllowStyledText = True AllowTabs = False - BackgroundColor = &cF8EAC000 + BackgroundColor = &cFFFFFF00 Bold = False Enabled = True FontName = "System" @@ -517,7 +481,7 @@ End #tag EndEvents #tag Events BevelButton_Delete #tag Event - Sub Pressed() + Sub Action() If ComboBox_Name.Text.Trim.Length=0 Then Return If Not Show_MessageDialog(MessageDialog.IconTypes.Question, "Delete", "Cancel", "Are you sure you want to delete the Model from the Database?", _ "The model is deleted from the database. Presets using this model will continue to show this model as the model in use, but information stored about this model, such as a recommended positive prompt, will no longer be available.") Then Return @@ -535,7 +499,7 @@ End #tag EndEvents #tag Events BevelButton_Save #tag Event - Sub Pressed() + Sub Action() If ComboBox_Name.Text.Trim.Length=0 Then Return Model.Save diff --git a/Window_PromptImporter.xojo_window b/Window_PromptImporter.xojo_window index f141bdf..c301ffb 100644 --- a/Window_PromptImporter.xojo_window +++ b/Window_PromptImporter.xojo_window @@ -71,7 +71,7 @@ Begin DesktopWindow Window_PromptImporter Visible = True Width = 360 End - Begin DesktopListBox ListBox_Keywords + Begin DesktopListBoxDM ListBox_Keywords AllowAutoDeactivate= True AllowAutoHideScrollbars= True AllowExpandableRows= False @@ -104,6 +104,7 @@ Begin DesktopWindow Window_PromptImporter LockLeft = True LockRight = True LockTop = True + NegativeColumn = 2 RequiresSelection= False RowSelectionType= 1 Scope = 2 @@ -325,24 +326,6 @@ End Next End Sub #tag EndEvent - #tag Event - Function PaintCellBackground(g As Graphics, row As Integer, column As Integer) As Boolean - If row=-1 Or row>Me.LastRowIndex Then Return False - - If Me.CellCheckBoxValueAt(row,2) Then - - g.DrawingColor=&cFFECEC00 - - Else - - g.DrawingColor=&cE8FFE800 - - - End If - - g.FillRectangle(0,0,g.Width,g.Height) - End Function - #tag EndEvent #tag Event Sub CellAction(row As Integer, column As Integer) If row=-1 Or row>Me.LastRowIndex Then Return