- another way to show splitter points under gtk1

- buildlazarusdialog adjusted as suggested by Darius

git-svn-id: trunk@11287 -
This commit is contained in:
paul 2007-06-06 02:19:44 +00:00
parent 6b2ec19d9c
commit 59aa486876
7 changed files with 184 additions and 112 deletions

View File

@ -6,8 +6,7 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg
HorzScrollBar.Page = 499 HorzScrollBar.Page = 499
VertScrollBar.Page = 499 VertScrollBar.Page = 499
ActiveControl = CleanAllCheckBox ActiveControl = CleanAllCheckBox
BorderIcons = [biSystemMenu, biMinimize] BorderIcons = [biSystemMenu]
BorderStyle = bsSizeToolWin
Caption = 'ConfigureBuildLazarusDlg' Caption = 'ConfigureBuildLazarusDlg'
ClientHeight = 500 ClientHeight = 500
ClientWidth = 500 ClientWidth = 500
@ -63,7 +62,7 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg
AnchorSideLeft.Control = LCLInterfaceRadioGroup AnchorSideLeft.Control = LCLInterfaceRadioGroup
Left = 338 Left = 338
Height = 15 Height = 15
Top = 218 Top = 214
Width = 63 Width = 63
Caption = 'Clean All' Caption = 'Clean All'
TabOrder = 0 TabOrder = 0
@ -110,7 +109,7 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg
object LCLInterfaceRadioGroup: TRadioGroup object LCLInterfaceRadioGroup: TRadioGroup
Left = 338 Left = 338
Height = 188 Height = 188
Top = 11 Top = 10
Width = 149 Width = 149
Anchors = [akTop, akRight, akBottom] Anchors = [akTop, akRight, akBottom]
AutoFill = True AutoFill = True

View File

@ -4,80 +4,80 @@ LazarusResources.Add('TConfigureBuildLazarusDlg','FORMDATA',[
'TPF0'#25'TConfigureBuildLazarusDlg'#24'ConfigureBuildLazarusDlg'#4'Left'#3#29 'TPF0'#25'TConfigureBuildLazarusDlg'#24'ConfigureBuildLazarusDlg'#4'Left'#3#29
+#1#6'Height'#3#244#1#3'Top'#3#178#0#5'Width'#3#244#1#18'HorzScrollBar.Page'#3 +#1#6'Height'#3#244#1#3'Top'#3#178#0#5'Width'#3#244#1#18'HorzScrollBar.Page'#3
+#243#1#18'VertScrollBar.Page'#3#243#1#13'ActiveControl'#7#16'CleanAllCheckBo' +#243#1#18'VertScrollBar.Page'#3#243#1#13'ActiveControl'#7#16'CleanAllCheckBo'
+'x'#11'BorderIcons'#11#12'biSystemMenu'#10'biMinimize'#0#11'BorderStyle'#7#13 +'x'#11'BorderIcons'#11#12'biSystemMenu'#0#7'Caption'#6#24'ConfigureBuildLaza'
+'bsSizeToolWin'#7'Caption'#6#24'ConfigureBuildLazarusDlg'#12'ClientHeight'#3 +'rusDlg'#12'ClientHeight'#3#244#1#11'ClientWidth'#3#244#1#7'OnClose'#7#9'For'
+#244#1#11'ClientWidth'#3#244#1#7'OnClose'#7#9'FormClose'#8'OnCreate'#7#10'Fo' +'mClose'#8'OnCreate'#7#10'FormCreate'#9'OnDestroy'#7#11'FormDestroy'#8'Posit'
+'rmCreate'#9'OnDestroy'#7#11'FormDestroy'#8'Position'#7#14'poScreenCenter'#0 +'ion'#7#14'poScreenCenter'#0#6'TLabel'#12'OptionsLabel'#21'AnchorSideTop.Con'
+#6'TLabel'#12'OptionsLabel'#21'AnchorSideTop.Control'#7#11'OptionsEdit'#18'A' +'trol'#7#11'OptionsEdit'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#10#6
+'nchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#10#6'Height'#2#17#3'Top'#3#27#1 +'Height'#2#17#3'Top'#3#27#1#5'Width'#2'.'#7'Caption'#6#8'Options:'#5'Color'#7
+#5'Width'#2'.'#7'Caption'#6#8'Options:'#5'Color'#7#6'clNone'#11'ParentColor' +#6'clNone'#11'ParentColor'#8#0#0#6'TLabel'#13'TargetOSLabel'#21'AnchorSideTo'
+#8#0#0#6'TLabel'#13'TargetOSLabel'#21'AnchorSideTop.Control'#7#12'TargetOSEd' +'p.Control'#7#12'TargetOSEdit'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'
+'it'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#10#6'Height'#2#17#3'Top' +#2#10#6'Height'#2#17#3'Top'#3'9'#1#5'Width'#2'7'#7'Caption'#6#10'Target OS:'
+#3'9'#1#5'Width'#2'7'#7'Caption'#6#10'Target OS:'#5'Color'#7#6'clNone'#11'Pa' +#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#6'TLabel'#20'TargetDirectoryLabe'
+'rentColor'#8#0#0#6'TLabel'#20'TargetDirectoryLabel'#21'AnchorSideTop.Contro' +'l'#21'AnchorSideTop.Control'#7#23'TargetDirectoryComboBox'#18'AnchorSideTop'
+'l'#7#23'TargetDirectoryComboBox'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Le' +'.Side'#7#9'asrCenter'#4'Left'#2#10#6'Height'#2#17#3'Top'#3'X'#1#5'Width'#2
+'ft'#2#10#6'Height'#2#17#3'Top'#3'X'#1#5'Width'#2'X'#7'Caption'#6#17'Target ' +'X'#7'Caption'#6#17'Target Directory:'#5'Color'#7#6'clNone'#11'ParentColor'#8
+'Directory:'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#6'TLabel'#14'TargetC' +#0#0#6'TLabel'#14'TargetCPULabel'#21'AnchorSideTop.Control'#7#17'TargetCPUCo'
+'PULabel'#21'AnchorSideTop.Control'#7#17'TargetCPUComboBox'#18'AnchorSideTop' +'mboBox'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#10#6'Height'#2#17#3
+'.Side'#7#9'asrCenter'#4'Left'#2#10#6'Height'#2#17#3'Top'#3'v'#1#5'Width'#2 +'Top'#3'v'#1#5'Width'#2';'#7'Caption'#6#10'Target CPU'#5'Color'#7#6'clNone'
+';'#7'Caption'#6#10'Target CPU'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#9 +#11'ParentColor'#8#0#0#9'TCheckBox'#16'CleanAllCheckBox'#22'AnchorSideLeft.C'
+'TCheckBox'#16'CleanAllCheckBox'#22'AnchorSideLeft.Control'#7#22'LCLInterfac' +'ontrol'#7#22'LCLInterfaceRadioGroup'#4'Left'#3'R'#1#6'Height'#2#15#3'Top'#3
+'eRadioGroup'#4'Left'#3'R'#1#6'Height'#2#15#3'Top'#3#218#0#5'Width'#2'?'#7'C' +#214#0#5'Width'#2'?'#7'Caption'#6#9'Clean All'#8'TabOrder'#2#0#0#0#5'TEdit'
+'aption'#6#9'Clean All'#8'TabOrder'#2#0#0#0#5'TEdit'#11'OptionsEdit'#4'Left' +#11'OptionsEdit'#4'Left'#3#156#0#6'Height'#2#23#3'Top'#3#24#1#5'Width'#3'K'#1
+#3#156#0#6'Height'#2#23#3'Top'#3#24#1#5'Width'#3'K'#1#7'Anchors'#11#6'akLeft' +#7'Anchors'#11#6'akLeft'#7'akRight'#8'akBottom'#0#8'TabOrder'#2#4#0#0#5'TEdi'
+#7'akRight'#8'akBottom'#0#8'TabOrder'#2#4#0#0#5'TEdit'#12'TargetOSEdit'#4'Le' +'t'#12'TargetOSEdit'#4'Left'#3#156#0#6'Height'#2#24#3'Top'#3'5'#1#5'Width'#3
+'ft'#3#156#0#6'Height'#2#24#3'Top'#3'5'#1#5'Width'#3'K'#1#7'Anchors'#11#6'ak' +'K'#1#7'Anchors'#11#6'akLeft'#7'akRight'#8'akBottom'#0#8'TabOrder'#2#5#0#0#9
+'Left'#7'akRight'#8'akBottom'#0#8'TabOrder'#2#5#0#0#9'TComboBox'#23'TargetDi' +'TComboBox'#23'TargetDirectoryComboBox'#18'AnchorSideTop.Side'#7#9'asrBottom'
+'rectoryComboBox'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#3#156#0#6'He' +#4'Left'#3#156#0#6'Height'#2#21#3'Top'#3'V'#1#5'Width'#3'3'#1#7'Anchors'#11#6
+'ight'#2#21#3'Top'#3'V'#1#5'Width'#3'3'#1#7'Anchors'#11#6'akLeft'#7'akRight' +'akLeft'#7'akRight'#8'akBottom'#0#16'AutoCompleteText'#11#22'cbactEndOfLineC'
+#8'akBottom'#0#16'AutoCompleteText'#11#22'cbactEndOfLineComplete'#20'cbactSe' +'omplete'#20'cbactSearchAscending'#0#10'ItemHeight'#2#13#9'MaxLength'#2#0#8
+'archAscending'#0#10'ItemHeight'#2#13#9'MaxLength'#2#0#8'TabOrder'#2#6#0#0#7 +'TabOrder'#2#6#0#0#7'TButton'#21'TargetDirectoryButton'#4'Left'#3#209#1#6'He'
+'TButton'#21'TargetDirectoryButton'#4'Left'#3#209#1#6'Height'#2#19#3'Top'#3 +'ight'#2#19#3'Top'#3'V'#1#5'Width'#2#22#7'Anchors'#11#7'akRight'#8'akBottom'
+'V'#1#5'Width'#2#22#7'Anchors'#11#7'akRight'#8'akBottom'#0#25'BorderSpacing.' +#0#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#3'...'#7'OnClick'#7#26'Tar'
+'InnerBorder'#2#4#7'Caption'#6#3'...'#7'OnClick'#7#26'TargetDirectoryButtonC' +'getDirectoryButtonClick'#8'TabOrder'#2#7#0#0#11'TRadioGroup'#22'LCLInterfac'
+'lick'#8'TabOrder'#2#7#0#0#11'TRadioGroup'#22'LCLInterfaceRadioGroup'#4'Left' +'eRadioGroup'#4'Left'#3'R'#1#6'Height'#3#188#0#3'Top'#2#10#5'Width'#3#149#0#7
+#3'R'#1#6'Height'#3#188#0#3'Top'#2#11#5'Width'#3#149#0#7'Anchors'#11#5'akTop' +'Anchors'#11#5'akTop'#7'akRight'#8'akBottom'#0#8'AutoFill'#9#7'Caption'#6#22
+#7'akRight'#8'akBottom'#0#8'AutoFill'#9#7'Caption'#6#22'LCLInterfaceRadioGro' +'LCLInterfaceRadioGroup'#28'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing'
+'up'#28'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2 +'.TopBottomSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24'crsHomogenous'
+#6#29'ChildSizing.EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27'Child' +'ChildResize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenousChildResize'
+'Sizing.EnlargeVertical'#7#24'crsHomogenousChildResize'#28'ChildSizing.Shrin' +#28'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildSizing.Shrink'
+'kHorizontal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsSc' +'Vertical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclLeftToRightTh'
+'aleChilds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'Ch' +'enTopToBottom'#27'ChildSizing.ControlsPerLine'#2#1#8'TabOrder'#2#2#0#0#9'TC'
+'ildSizing.ControlsPerLine'#2#1#8'TabOrder'#2#2#0#0#9'TCheckBox'#26'WithStat' +'heckBox'#26'WithStaticPackagesCheckBox'#22'AnchorSideLeft.Control'#7#22'LCL'
+'icPackagesCheckBox'#22'AnchorSideLeft.Control'#7#22'LCLInterfaceRadioGroup' +'InterfaceRadioGroup'#4'Left'#3'R'#1#6'Height'#2#15#3'Top'#3#248#0#5'Width'#3
+#4'Left'#3'R'#1#6'Height'#2#15#3'Top'#3#248#0#5'Width'#3#168#0#7'Anchors'#11 +#168#0#7'Anchors'#11#6'akLeft'#8'akBottom'#0#7'Caption'#6#26'WithStaticPacka'
+#6'akLeft'#8'akBottom'#0#7'Caption'#6#26'WithStaticPackagesCheckBox'#8'TabOr' +'gesCheckBox'#8'TabOrder'#2#3#0#0#9'TCheckBox'#25'RestartAfterBuildCheckBox'
+'der'#2#3#0#0#9'TCheckBox'#25'RestartAfterBuildCheckBox'#4'Left'#2#10#6'Heig' +#4'Left'#2#10#6'Height'#2#15#3'Top'#3#158#1#5'Width'#3#150#0#7'Anchors'#11#6
+'ht'#2#15#3'Top'#3#158#1#5'Width'#3#150#0#7'Anchors'#11#6'akLeft'#8'akBottom' +'akLeft'#8'akBottom'#0#7'Caption'#6#25'RestartAfterBuildCheckBox'#8'TabOrder'
+#0#7'Caption'#6#25'RestartAfterBuildCheckBox'#8'TabOrder'#2#9#0#0#9'TCheckBo' +#2#9#0#0#9'TCheckBox'#20'ConfirmBuildCheckBox'#4'Left'#2#10#6'Height'#2#15#3
+'x'#20'ConfirmBuildCheckBox'#4'Left'#2#10#6'Height'#2#15#3'Top'#3#184#1#5'Wi' +'Top'#3#184#1#5'Width'#3#129#0#7'Anchors'#11#6'akLeft'#8'akBottom'#0#7'Capti'
+'dth'#3#129#0#7'Anchors'#11#6'akLeft'#8'akBottom'#0#7'Caption'#6#20'ConfirmB' +'on'#6#20'ConfirmBuildCheckBox'#8'TabOrder'#2#10#0#0#7'TButton'#18'SaveSetti'
+'uildCheckBox'#8'TabOrder'#2#10#0#0#7'TButton'#18'SaveSettingsButton'#23'Anc' +'ngsButton'#23'AnchorSideRight.Control'#7#12'CancelButton'#24'AnchorSideBott'
+'horSideRight.Control'#7#12'CancelButton'#24'AnchorSideBottom.Control'#7#12 +'om.Control'#7#12'CancelButton'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'L'
+'CancelButton'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#3'D'#1#6'Hei' +'eft'#3'D'#1#6'Height'#2#25#3'Top'#3#208#1#5'Width'#2'\'#7'Anchors'#11#7'akR'
+'ght'#2#25#3'Top'#3#208#1#5'Width'#2'\'#7'Anchors'#11#7'akRight'#8'akBottom' +'ight'#8'akBottom'#0#8'AutoSize'#9#19'BorderSpacing.Right'#2#10#25'BorderSpa'
+#0#8'AutoSize'#9#19'BorderSpacing.Right'#2#10#25'BorderSpacing.InnerBorder'#2 +'cing.InnerBorder'#2#4#7'Caption'#6#13'Save settings'#7'Default'#9#7'OnClick'
+#4#7'Caption'#6#13'Save settings'#7'Default'#9#7'OnClick'#7#23'SaveSettingsB' +#7#23'SaveSettingsButtonClick'#8'TabOrder'#2#11#0#0#7'TButton'#12'CancelButt'
+'uttonClick'#8'TabOrder'#2#11#0#0#7'TButton'#12'CancelButton'#4'Left'#3#170#1 +'on'#4'Left'#3#170#1#6'Height'#2#25#3'Top'#3#208#1#5'Width'#2'='#7'Anchors'
+#6'Height'#2#25#3'Top'#3#208#1#5'Width'#2'='#7'Anchors'#11#7'akRight'#8'akBo' +#11#7'akRight'#8'akBottom'#0#8'AutoSize'#9#25'BorderSpacing.InnerBorder'#2#4
+'ttom'#0#8'AutoSize'#9#25'BorderSpacing.InnerBorder'#2#4#6'Cancel'#9#7'Capti' +#6'Cancel'#9#7'Caption'#6#6'Cancel'#7'OnClick'#7#17'CancelButtonClick'#8'Tab'
+'on'#6#6'Cancel'#7'OnClick'#7#17'CancelButtonClick'#8'TabOrder'#2#12#0#0#8'T' +'Order'#2#12#0#0#8'TListBox'#12'ItemsListBox'#4'Left'#2#10#6'Height'#3#229#0
+'ListBox'#12'ItemsListBox'#4'Left'#2#10#6'Height'#3#229#0#3'Top'#2'"'#5'Widt' +#3'Top'#2'"'#5'Width'#3'?'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'a'
+'h'#3'?'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#10'Item' +'kBottom'#0#10'ItemHeight'#2#25#10'OnDrawItem'#7#20'ItemsListBoxDrawItem'#11
+'Height'#2#25#10'OnDrawItem'#7#20'ItemsListBoxDrawItem'#11'OnMouseDown'#7#21 +'OnMouseDown'#7#21'ItemsListBoxMouseDown'#10'OnShowHint'#7#20'ItemsListBoxSh'
,'ItemsListBoxMouseDown'#10'OnShowHint'#7#20'ItemsListBoxShowHint'#14'ParentS' ,'owHint'#14'ParentShowHint'#8#8'ShowHint'#9#5'Style'#7#16'lbOwnerDrawFixed'#8
+'howHint'#8#8'ShowHint'#9#5'Style'#7#16'lbOwnerDrawFixed'#8'TabOrder'#2#1#0#0 +'TabOrder'#2#1#0#0#9'TComboBox'#17'TargetCPUComboBox'#4'Left'#3#156#0#6'Heig'
+#9'TComboBox'#17'TargetCPUComboBox'#4'Left'#3#156#0#6'Height'#2#21#3'Top'#3 +'ht'#2#21#3'Top'#3't'#1#5'Width'#3'3'#1#7'Anchors'#11#6'akLeft'#7'akRight'#8
+'t'#1#5'Width'#3'3'#1#7'Anchors'#11#6'akLeft'#7'akRight'#8'akBottom'#0#16'Au' +'akBottom'#0#16'AutoCompleteText'#11#22'cbactEndOfLineComplete'#20'cbactSear'
+'toCompleteText'#11#22'cbactEndOfLineComplete'#20'cbactSearchAscending'#0#10 +'chAscending'#0#10'ItemHeight'#2#13#9'MaxLength'#2#0#8'TabOrder'#2#8#0#0#7'T'
+'ItemHeight'#2#13#9'MaxLength'#2#0#8'TabOrder'#2#8#0#0#7'TButton'#13'Compile' +'Button'#13'CompileButton'#23'AnchorSideRight.Control'#7#18'SaveSettingsButt'
+'Button'#23'AnchorSideRight.Control'#7#18'SaveSettingsButton'#24'AnchorSideB' +'on'#24'AnchorSideBottom.Control'#7#18'SaveSettingsButton'#21'AnchorSideBott'
+'ottom.Control'#7#18'SaveSettingsButton'#21'AnchorSideBottom.Side'#7#9'asrBo' +'om.Side'#7#9'asrBottom'#4'Left'#3#249#0#6'Height'#2#25#3'Top'#3#208#1#5'Wid'
+'ttom'#4'Left'#3#249#0#6'Height'#2#25#3'Top'#3#208#1#5'Width'#2'A'#7'Anchors' +'th'#2'A'#7'Anchors'#11#7'akRight'#8'akBottom'#0#8'AutoSize'#9#19'BorderSpac'
+#11#7'akRight'#8'akBottom'#0#8'AutoSize'#9#19'BorderSpacing.Right'#2#10#25'B' +'ing.Right'#2#10#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#7'Compile'#7
+'orderSpacing.InnerBorder'#2#4#7'Caption'#6#7'Compile'#7'OnClick'#7#18'Compi' +'OnClick'#7#18'CompileButtonClick'#8'TabOrder'#2#13#0#0#14'THeaderControl'#14
+'leButtonClick'#8'TabOrder'#2#13#0#0#14'THeaderControl'#14'ItemListHeader'#4 +'ItemListHeader'#4'Left'#2#10#6'Height'#2#24#3'Top'#2#10#5'Width'#3'?'#1#8'S'
+'Left'#2#10#6'Height'#2#24#3'Top'#2#10#5'Width'#3'?'#1#8'Sections'#14#0#14'O' +'ections'#14#0#14'OnSectionClick'#7#26'ItemListHeaderSectionClick'#7'Anchors'
+'nSectionClick'#7#26'ItemListHeaderSectionClick'#7'Anchors'#11#5'akTop'#6'ak' +#11#5'akTop'#6'akLeft'#7'akRight'#0#8'OnResize'#7#20'ItemListHeaderResize'#0
+'Left'#7'akRight'#0#8'OnResize'#7#20'ItemListHeaderResize'#0#0#0 +#0#0
]); ]);

View File

@ -743,7 +743,7 @@ procedure TConfigureBuildLazarusDlg.ItemsListBoxDrawItem(Control: TWinControl;
var var
ButtonState: TThemedButton; ButtonState: TThemedButton;
ButtonDetails: TThemedElementDetails; ButtonDetails: TThemedElementDetails;
x, cx, cy: Integer; x, RadioSize: Integer;
ButtonRect: TRect; ButtonRect: TRect;
CurItem: TBuildLazarusItem; CurItem: TBuildLazarusItem;
CurStr: String; CurStr: String;
@ -777,16 +777,13 @@ begin
if ThemeServices.HasTransparentParts(ButtonDetails) then if ThemeServices.HasTransparentParts(ButtonDetails) then
ItemsListBox.Canvas.FillRect(ButtonRect); ItemsListBox.Canvas.FillRect(ButtonRect);
// how to get cx and cy? RadioSize := ThemeServices.GetDetailSize(ButtonDetails);
cx := 13;//GetSystemMetrics(SM_CXMENUCHECK); if (RadioSize <> -1) then
cy := 13;//GetSystemMetrics(SM_CYMENUCHECK);
if (cx <> -1) and (cy <> -1) then
begin begin
ButtonRect.Left := (ButtonRect.Left + ButtonRect.Right - cx) div 2; ButtonRect.Left := (ButtonRect.Left + ButtonRect.Right - RadioSize) div 2;
ButtonRect.Right := ButtonRect.Left + cx; ButtonRect.Right := ButtonRect.Left + RadioSize;
ButtonRect.Top := (ButtonRect.Top + ButtonRect.Bottom - cy) div 2; ButtonRect.Top := (ButtonRect.Top + ButtonRect.Bottom - RadioSize) div 2;
ButtonRect.Bottom := ButtonRect.Top + cy; ButtonRect.Bottom := ButtonRect.Top + RadioSize;
end; end;
ThemeServices.DrawElement(ItemsListBox.Canvas.GetUpdatedHandle([csBrushValid,csPenValid]), ButtonDetails, ButtonRect); ThemeServices.DrawElement(ItemsListBox.Canvas.GetUpdatedHandle([csBrushValid,csPenValid]), ButtonDetails, ButtonRect);
@ -1340,4 +1337,3 @@ initialization
{$I buildlazdialog.lrs} {$I buildlazdialog.lrs}
end. end.

View File

@ -678,7 +678,6 @@ end;
procedure TCustomSplitter.Paint; procedure TCustomSplitter.Paint;
const const
GripperSize = 30; // todo: look at gtk size
GripperDetailsPart: array[Boolean] of TThemedRebar = GripperDetailsPart: array[Boolean] of TThemedRebar =
( (
trGripperVert, trGripperVert,
@ -688,6 +687,7 @@ var
ARect, GripperRect: TRect; ARect, GripperRect: TRect;
BgPart: TThemedRebar; BgPart: TThemedRebar;
BgDetails, GripperDetails: TThemedElementDetails; BgDetails, GripperDetails: TThemedElementDetails;
GripperSize: Integer;
begin begin
inherited Paint; inherited Paint;
@ -710,21 +710,24 @@ begin
BF_ADJUST or BF_RECT, @ARect); BF_ADJUST or BF_RECT, @ARect);
GripperRect := ARect; GripperRect := ARect;
GripperSize := ThemeServices.GetDetailSize(GripperDetails);
if ResizeAnchor in [akLeft,akRight] then if GripperSize <> -1 then
begin begin
if (GripperRect.Bottom - GripperRect.Top) > GripperSize then if ResizeAnchor in [akLeft,akRight] then
begin begin
GripperRect.Top := (GripperRect.Top + GripperRect.Bottom - GripperSize) div 2; if (GripperRect.Bottom - GripperRect.Top) > GripperSize then
GripperRect.Bottom := GripperRect.Top + GripperSize; begin
end; GripperRect.Top := (GripperRect.Top + GripperRect.Bottom - GripperSize) div 2;
end GripperRect.Bottom := GripperRect.Top + GripperSize;
else end;
begin end
if (GripperRect.Right - GripperRect.Left) > GripperSize then else
begin begin
GripperRect.Left := (GripperRect.Left + GripperRect.Right - GripperSize) div 2; if (GripperRect.Right - GripperRect.Left) > GripperSize then
GripperRect.Right := GripperRect.Left + GripperSize; begin
GripperRect.Left := (GripperRect.Left + GripperRect.Right - GripperSize) div 2;
GripperRect.Right := GripperRect.Left + GripperSize;
end;
end; end;
end; end;

View File

@ -31,10 +31,11 @@ type
gptCheck, gptCheck,
gptOption, gptOption,
gptTab, gptTab,
// gptSlider, gptSlider,
gptHandle gptHandle,
// gptExpander, gptExpander,
// gptResizeGrip gptResizeGrip,
gptFocus
); );
TGtkStyleParams = record TGtkStyleParams = record
@ -47,11 +48,17 @@ type
Shadow : TGtkShadowType; // Shadow Shadow : TGtkShadowType; // Shadow
Detail : String; // Detail (button, checkbox, ...) Detail : String; // Detail (button, checkbox, ...)
Orientation: TGtkOrientation; // Orientation (horizontal/vertical) Orientation: TGtkOrientation; // Orientation (horizontal/vertical)
{$ifdef gtk2}
Expander : TGtkExpanderStyle; // treeview expander
Edge : TGdkWindowEdge;
{$endif}
IsHot : Boolean; IsHot : Boolean;
end; end;
{ TGtk1ThemeServices } { TGtk1ThemeServices }
{ TGtkThemeServices }
TGtkThemeServices = class(TThemeServices) TGtkThemeServices = class(TThemeServices)
private private
protected protected
@ -63,7 +70,10 @@ type
function ThemedControlsEnabled: Boolean; override; function ThemedControlsEnabled: Boolean; override;
procedure InternalDrawParentBackground(Window: HWND; Target: HDC; Bounds: PRect); override; procedure InternalDrawParentBackground(Window: HWND; Target: HDC; Bounds: PRect); override;
function GetBaseDetailsSize(Details: TThemedElementDetails): Integer;
public public
function GetDetailSize(Details: TThemedElementDetails): Integer; override;
procedure DrawElement(DC: HDC; Details: TThemedElementDetails; const R: TRect; ClipRect: PRect); override; procedure DrawElement(DC: HDC; Details: TThemedElementDetails; const R: TRect; ClipRect: PRect); override;
procedure DrawIcon(DC: HDC; Details: TThemedElementDetails; const R: TRect; himl: HIMAGELIST; Index: Integer); override; procedure DrawIcon(DC: HDC; Details: TThemedElementDetails; const R: TRect; himl: HIMAGELIST; Index: Integer); override;
procedure DrawText(DC: HDC; Details: TThemedElementDetails; const S: WideString; R: TRect; Flags, Flags2: Cardinal); override; procedure DrawText(DC: HDC; Details: TThemedElementDetails; const S: WideString; R: TRect; Flags, Flags2: Cardinal); override;
@ -224,20 +234,20 @@ begin
Result.Shadow := GTK_SHADOW_NONE; Result.Shadow := GTK_SHADOW_NONE;
{ This code has problems with some (is not most) of gtk1 themes. { This code has problems with some (is not most) of gtk1 themes.
But at least Ubuntu >= 6.10 works fine. So it is commented out and switched But at least Ubuntu >= 6.10 works fine. So it is commented out and switched
to alternate splitter painting to alternate splitter painting}
if Details.Part = RP_GRIPPER then if Details.Part = RP_GRIPPER then
Result.Detail := 'hpaned' Result.Detail := 'hpaned'
else else
Result.Detail := 'vpaned'; Result.Detail := 'vpaned';
Result.Painter := gptBox; Result.Painter := gptBox;
}
Result.Detail := 'paned'; { Result.Detail := 'paned';
Result.Painter := gptHandle; Result.Painter := gptHandle;
if Details.Part = RP_GRIPPER then if Details.Part = RP_GRIPPER then
Result.Orientation := GTK_ORIENTATION_VERTICAL Result.Orientation := GTK_ORIENTATION_VERTICAL
else else
Result.Orientation := GTK_ORIENTATION_HORIZONTAL; Result.Orientation := GTK_ORIENTATION_HORIZONTAL;}
end; end;
RP_BAND: RP_BAND:
begin begin
@ -347,6 +357,13 @@ begin
@Area, Widget, PChar(Detail), @Area, Widget, PChar(Detail),
Area.x, Area.y, Area.x, Area.y,
Area.Width, Area.Height); Area.Width, Area.Height);
gptSlider : gtk_paint_slider(
Style, Window,
State, Shadow,
@Area, Widget, PChar(Detail),
Area.x, Area.y,
Area.Width, Area.Height,
Orientation);
gptHandle : gtk_paint_handle( gptHandle : gtk_paint_handle(
Style, Window, Style, Window,
State, Shadow, State, Shadow,
@ -354,6 +371,24 @@ begin
Area.x, Area.y, Area.x, Area.y,
Area.Width, Area.Height, Area.Width, Area.Height,
Orientation); Orientation);
{$ifdef gtk2}
gptExpander: gtk_paint_expander(
Style, Window, State,
@Area, Widget, PChar(Detail),
Area.x, Area.y,
Expander);
gptResizeGrip: gtk_paint_resize_grip(
Style, Window, State,
@Area, Widget,
PChar(Detail), Edge,
Area.x, Area.y,
Area.Width, Area.Height);
{$endif}
gptFocus : gtk_paint_focus(
Style, Window, {$ifdef gtk2}State,{$endif}
@Area, Widget, PChar(Detail),
Area.x, Area.y,
Area.Width, Area.Height);
end; end;
end; end;
end; end;
@ -377,6 +412,22 @@ begin
// ? // ?
end; end;
function TGtkThemeServices.GetBaseDetailsSize(Details: TThemedElementDetails): Integer;
begin
Result := inherited GetDetailSize(Details);
end;
function TGtkThemeServices.GetDetailSize(Details: TThemedElementDetails): Integer;
begin
case Details.Element of
teRebar :
if Details.Part in [RP_GRIPPER, RP_GRIPPERVERT] then
Result := -1;
else
Result := GetBaseDetailsSize(Details);
end;
end;
procedure TGtkThemeServices.DrawText(DC: HDC; Details: TThemedElementDetails; procedure TGtkThemeServices.DrawText(DC: HDC; Details: TThemedElementDetails;
const S: WideString; R: TRect; Flags, Flags2: Cardinal); const S: WideString; R: TRect; Flags, Flags2: Cardinal);
var var

View File

@ -21,6 +21,7 @@ type
protected protected
function GetGtkStyleParams(DC: HDC; Details: TThemedElementDetails): TGtkStyleParams; override; function GetGtkStyleParams(DC: HDC; Details: TThemedElementDetails): TGtkStyleParams; override;
public public
function GetDetailSize(Details: TThemedElementDetails): Integer; override;
end; end;
implementation implementation
@ -74,5 +75,10 @@ begin
end; end;
end; end;
function TGtk2ThemeServices.GetDetailSize(Details: TThemedElementDetails): Integer;
begin
Result := GetBaseDetailsSize(Details);
end;
end. end.

View File

@ -448,6 +448,8 @@ type
function GetElementDetails(Detail: TThemedTrayNotify): TThemedElementDetails; overload; function GetElementDetails(Detail: TThemedTrayNotify): TThemedElementDetails; overload;
function GetElementDetails(Detail: TThemedTreeview): TThemedElementDetails; overload; function GetElementDetails(Detail: TThemedTreeview): TThemedElementDetails; overload;
function GetElementDetails(Detail: TThemedWindow): TThemedElementDetails; overload; function GetElementDetails(Detail: TThemedWindow): TThemedElementDetails; overload;
function GetDetailSize(Details: TThemedElementDetails): Integer; virtual;
function ColorToRGB(Color: LongInt; Details: PThemedElementDetails = nil): COLORREF; function ColorToRGB(Color: LongInt; Details: PThemedElementDetails = nil): COLORREF;
function ContentRect(DC: HDC; Details: TThemedElementDetails; BoundingRect: TRect): TRect; virtual; function ContentRect(DC: HDC; Details: TThemedElementDetails; BoundingRect: TRect): TRect; virtual;
@ -1729,6 +1731,21 @@ begin
end; end;
end; end;
function TThemeServices.GetDetailSize(Details: TThemedElementDetails): Integer;
begin
// default values here
// -1 mean that we dont know size of detail
Result := -1;
case Details.Element of
teButton:
if Details.Part in [BP_RADIOBUTTON, BP_CHECKBOX] then
Result := 13;
teRebar :
if Details.Part in [RP_GRIPPER, RP_GRIPPERVERT] then
Result := 30;
end;
end;
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
function TThemeServices.ColorToRGB(Color: LongInt; Details: PThemedElementDetails = nil): COLORREF; function TThemeServices.ColorToRGB(Color: LongInt; Details: PThemedElementDetails = nil): COLORREF;