spktoolbar: Add inherited properties. Add DoubleBuffered = true (otherwise severe flickering after recent changes in Laz trunk after r57267)

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6185 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2018-02-07 22:05:46 +00:00
parent f3bc7dc114
commit 14633ea902
5 changed files with 42 additions and 653 deletions

View File

@ -361,7 +361,7 @@ type
// *** Drawing ***
// ***************
procedure EraseBackground(DC: HDC); override;
// procedure EraseBackground(DC: HDC); override;
{ Method draws the content of the component }
procedure Paint; override;
@ -429,6 +429,17 @@ type
property OnTabChanging: TSpkTabChangingEvent
read FOnTabChanging write FOnTabChanging;
property OnTabChanged: TNotifyEvent read FOnTabChanged write FOnTabChanged;
{ inherited properties }
property Align default alTop;
property BorderSpacing;
property Anchors;
property Hint;
property ParentShowHint;
property ShowHint;
property Visible;
property OnResize;
end;
@ -531,7 +542,9 @@ begin
inherited Create(AOwner);
// Initialization of inherited property
inherited Align := alTop;
Align := alTop;
DoubleBuffered := true; // required after Laz 1.9
//todo: not found in lcl
//inherited AlignWithMargins:=true;
@ -1067,7 +1080,7 @@ begin
inherited;
end;
(*
procedure TSpkToolbar.EraseBackground(DC: HDC);
begin
// The correct implementation is doing nothing
@ -1075,7 +1088,7 @@ begin
inherited; // wp: this calls FillRect!
// "inherited" removed in case of no themes to fix issue #0025047 (flickering
// when using standard windows theme or when manifest file is off)
end;
end; *)
procedure TSpkToolbar.SetBufferInvalid;
begin

View File

@ -216,42 +216,30 @@ object Form1: TForm1
CustomAppearance.Element.ActiveCaptionColor = 8405614
CustomAppearance.Element.Style = esRounded
Caption = 'File'
OverrideAppearance = False
Visible = True
Panes = (
'SpkPane1'
)
object SpkPane1: TSpkPane
Caption = 'File commands'
Visible = True
Items = (
'SpkLargeButton1'
'SpkLargeButton2'
'SpkLargeButton3'
)
object SpkLargeButton1: TSpkLargeButton
Visible = True
Enabled = True
Action = AcOpen
Caption = 'Open file'
LargeImageIndex = 1
ButtonKind = bkButton
end
object SpkLargeButton2: TSpkLargeButton
Visible = True
Enabled = True
Action = AcSave
Caption = 'Save file'
LargeImageIndex = 2
ButtonKind = bkButton
end
object SpkLargeButton3: TSpkLargeButton
Visible = True
Enabled = True
Action = AcQuit
Caption = 'Quit program'
LargeImageIndex = 0
ButtonKind = bkButton
end
end
end
@ -300,54 +288,36 @@ object Form1: TForm1
CustomAppearance.Element.ActiveCaptionColor = 8405614
CustomAppearance.Element.Style = esRounded
Caption = 'Edit'
OverrideAppearance = False
Visible = True
Panes = (
'SpkPane3'
)
object SpkPane3: TSpkPane
Caption = 'Edit commands'
Visible = True
Items = (
'SpkSmallButton1'
'SpkSmallButton2'
'SpkSmallButton7'
)
object SpkSmallButton1: TSpkSmallButton
Visible = True
Enabled = True
Action = AcEditCut
Caption = 'Cut'
GroupBehaviour = gbSingleItem
HideFrameWhenIdle = True
ImageIndex = 3
ShowCaption = True
TableBehaviour = tbBeginsRow
ButtonKind = bkButton
end
object SpkSmallButton2: TSpkSmallButton
Visible = True
Enabled = True
Action = AcEditCopy
Caption = 'Copy'
GroupBehaviour = gbSingleItem
HideFrameWhenIdle = True
ImageIndex = 4
ShowCaption = True
TableBehaviour = tbBeginsRow
ButtonKind = bkButton
end
object SpkSmallButton7: TSpkSmallButton
Visible = True
Enabled = True
Action = AcEditPaste
Caption = 'Paste'
GroupBehaviour = gbSingleItem
HideFrameWhenIdle = True
ImageIndex = 5
ShowCaption = True
TableBehaviour = tbBeginsRow
ButtonKind = bkButton
end
end
end
@ -396,14 +366,11 @@ object Form1: TForm1
CustomAppearance.Element.ActiveCaptionColor = 8405614
CustomAppearance.Element.Style = esRounded
Caption = 'Format'
OverrideAppearance = False
Visible = True
Panes = (
'SpkPane2'
)
object SpkPane2: TSpkPane
Caption = 'Format settings'
Visible = True
Items = (
'SpkSmallButton4'
'SpkSmallButton6'
@ -413,48 +380,33 @@ object Form1: TForm1
'SpkSmallButton11'
)
object SpkSmallButton4: TSpkSmallButton
Visible = True
Enabled = True
Action = AcBold
Caption = 'Bold'
GroupBehaviour = gbBeginsGroup
HideFrameWhenIdle = False
ImageIndex = 7
ShowCaption = False
TableBehaviour = tbContinuesRow
ButtonKind = bkToggle
end
object SpkSmallButton6: TSpkSmallButton
Visible = True
Enabled = True
Action = AcItalic
Caption = 'Italic'
GroupBehaviour = gbContinuesGroup
HideFrameWhenIdle = False
ImageIndex = 8
ShowCaption = False
TableBehaviour = tbContinuesRow
ButtonKind = bkToggle
end
object SpkSmallButton8: TSpkSmallButton
Visible = True
Enabled = True
Action = AcUnderline
Caption = 'Underline'
GroupBehaviour = gbEndsGroup
HideFrameWhenIdle = False
ImageIndex = 9
ShowCaption = False
TableBehaviour = tbContinuesRow
ButtonKind = bkToggle
end
object SpkSmallButton9: TSpkSmallButton
Visible = True
Enabled = True
Action = AcLeftJustify
Caption = 'Left justify'
GroupBehaviour = gbBeginsGroup
HideFrameWhenIdle = False
ImageIndex = 10
ShowCaption = False
TableBehaviour = tbBeginsRow
@ -462,28 +414,20 @@ object Form1: TForm1
GroupIndex = 2
end
object SpkSmallButton10: TSpkSmallButton
Visible = True
Enabled = True
Action = AcCenter
Caption = 'Centered'
GroupBehaviour = gbContinuesGroup
HideFrameWhenIdle = False
ImageIndex = 11
ShowCaption = False
TableBehaviour = tbContinuesRow
ButtonKind = bkToggle
GroupIndex = 2
end
object SpkSmallButton11: TSpkSmallButton
Visible = True
Enabled = True
Action = AcRightJustify
Caption = 'Right justify'
GroupBehaviour = gbEndsGroup
HideFrameWhenIdle = False
ImageIndex = 12
ShowCaption = False
TableBehaviour = tbContinuesRow
ButtonKind = bkToggle
GroupIndex = 2
end
@ -534,31 +478,23 @@ object Form1: TForm1
CustomAppearance.Element.ActiveCaptionColor = 8405614
CustomAppearance.Element.Style = esRounded
Caption = 'Options'
OverrideAppearance = False
Visible = True
Panes = (
'SpkPane6'
'SpkPane5'
)
object SpkPane6: TSpkPane
Caption = 'User interface'
Visible = True
Items = (
'SpkRadioButton1'
'SpkRadioButton2'
'SpkSmallButton3'
)
object SpkRadioButton1: TSpkRadioButton
Visible = True
Enabled = True
Action = AcClassicalGUI
Caption = 'Classical'
State = cbUnchecked
TableBehaviour = tbBeginsRow
end
object SpkRadioButton2: TSpkRadioButton
Visible = True
Enabled = True
Action = AcRibbonGUI
Caption = 'Ribbon'
Checked = True
@ -566,40 +502,26 @@ object Form1: TForm1
TableBehaviour = tbBeginsRow
end
object SpkSmallButton3: TSpkSmallButton
Visible = True
Enabled = True
Caption = 'Style'
GroupBehaviour = gbSingleItem
HideFrameWhenIdle = False
ImageIndex = 14
ShowCaption = True
TableBehaviour = tbContinuesRow
ButtonKind = bkDropdown
DropdownMenu = StyleMenu
end
end
object SpkPane5: TSpkPane
Caption = 'Save settings'
Visible = True
Items = (
'SpkSmallButton5'
'SpkCheckbox1'
)
object SpkSmallButton5: TSpkSmallButton
Visible = True
Enabled = True
Action = AcSaveNow
Caption = 'Save now'
GroupBehaviour = gbSingleItem
HideFrameWhenIdle = True
ImageIndex = 2
ShowCaption = True
TableBehaviour = tbBeginsRow
ButtonKind = bkButton
end
object SpkCheckbox1: TSpkCheckbox
Visible = True
Enabled = True
Action = AcAutoSave
Caption = 'Autosave'
Checked = True
@ -653,24 +575,18 @@ object Form1: TForm1
CustomAppearance.Element.ActiveCaptionColor = 8405614
CustomAppearance.Element.Style = esRounded
Caption = 'Help'
OverrideAppearance = False
Visible = True
Panes = (
'SpkPane4'
)
object SpkPane4: TSpkPane
Caption = 'Info'
Visible = True
Items = (
'SpkLargeButton4'
)
object SpkLargeButton4: TSpkLargeButton
Visible = True
Enabled = True
Action = AcAbout
Caption = 'About...'
LargeImageIndex = 6
ButtonKind = bkButton
end
end
end
@ -1421,9 +1337,6 @@ object Form1: TForm1
0000000000000000000000000000000000000000002E00000033000000330000
002E000000000000000000000000
}
BitmapAdv = {
4C6900000000
}
end
object LargeImageList: TImageList
Height = 32
@ -2329,8 +2242,5 @@ object Form1: TForm1
0009000000030000000000000000000000000000000000000000000000000000
0000000000000000000000000000
}
BitmapAdv = {
4C6900000000
}
end
end

View File

@ -1,11 +1,11 @@
object Form2: TForm2
Left = 311
Height = 352
Height = 340
Top = 214
Width = 782
Width = 777
Caption = 'Form2'
ClientHeight = 352
ClientWidth = 782
ClientHeight = 340
ClientWidth = 777
Color = clBtnFace
Font.Color = clWindowText
Font.Height = -11
@ -14,7 +14,7 @@ object Form2: TForm2
object SpkToolbar1: TSpkToolbar
Left = 0
Top = 0
Width = 782
Width = 777
Color = clBtnFace
Appearance.Tab.TabHeaderFont.Color = 2763306
Appearance.Tab.BorderColor = 10921638
@ -105,8 +105,6 @@ object Form2: TForm2
CustomAppearance.Element.ActiveCaptionColor = 8405614
CustomAppearance.Element.Style = esRounded
Caption = 'Narzedzia glówne'
OverrideAppearance = False
Visible = True
Panes = (
'SpkPane2'
'SpkPane3'
@ -116,7 +114,6 @@ object Form2: TForm2
)
object SpkPane2: TSpkPane
Caption = 'Plik'
Visible = True
Items = (
'SpkLargeButton4'
'SpkSmallButton2'
@ -124,50 +121,31 @@ object Form2: TForm2
'SpkSmallButton4'
)
object SpkLargeButton4: TSpkLargeButton
Visible = True
Enabled = True
Caption = 'Nowy'
LargeImageIndex = 3
ButtonKind = bkButton
end
object SpkSmallButton2: TSpkSmallButton
Visible = True
Enabled = True
Caption = 'Otwórz'
GroupBehaviour = gbSingleItem
HideFrameWhenIdle = True
ImageIndex = 16
ShowCaption = True
TableBehaviour = tbBeginsRow
ButtonKind = bkButton
DropdownMenu = PopupMenu2
end
object SpkSmallButton3: TSpkSmallButton
Visible = True
Enabled = True
Caption = 'Zapisz'
GroupBehaviour = gbSingleItem
HideFrameWhenIdle = True
ImageIndex = 56
ShowCaption = True
TableBehaviour = tbBeginsRow
ButtonKind = bkButton
end
object SpkSmallButton4: TSpkSmallButton
Visible = True
Enabled = True
Caption = 'Zapisz jako...'
GroupBehaviour = gbSingleItem
HideFrameWhenIdle = True
ImageIndex = 57
ShowCaption = True
TableBehaviour = tbBeginsRow
ButtonKind = bkButton
end
end
object SpkPane3: TSpkPane
Caption = 'Edycja'
Visible = True
Items = (
'SpkSmallButton1'
'SpkSmallButton5'
@ -176,128 +154,81 @@ object Form2: TForm2
'SpkSmallButton8'
)
object SpkSmallButton1: TSpkSmallButton
Visible = True
Enabled = True
Caption = 'Button'
GroupBehaviour = gbBeginsGroup
HideFrameWhenIdle = False
ImageIndex = 0
ShowCaption = False
TableBehaviour = tbContinuesRow
ButtonKind = bkButtonDropdown
DropdownMenu = PopupMenu2
end
object SpkSmallButton5: TSpkSmallButton
Visible = True
Enabled = True
Caption = 'Button'
GroupBehaviour = gbEndsGroup
HideFrameWhenIdle = False
ImageIndex = 31
ShowCaption = False
TableBehaviour = tbContinuesRow
ButtonKind = bkButtonDropdown
DropdownMenu = PopupMenu2
end
object SpkSmallButton6: TSpkSmallButton
Visible = True
Enabled = True
Caption = 'Button'
GroupBehaviour = gbBeginsGroup
HideFrameWhenIdle = False
ImageIndex = 53
ShowCaption = False
TableBehaviour = tbBeginsRow
ButtonKind = bkButton
end
object SpkSmallButton7: TSpkSmallButton
Visible = True
Enabled = True
Caption = 'Button'
GroupBehaviour = gbContinuesGroup
HideFrameWhenIdle = False
ImageIndex = 51
ShowCaption = False
TableBehaviour = tbContinuesRow
ButtonKind = bkButton
end
object SpkSmallButton8: TSpkSmallButton
Visible = True
Enabled = True
Caption = 'Button'
GroupBehaviour = gbEndsGroup
HideFrameWhenIdle = False
ImageIndex = 11
ShowCaption = False
TableBehaviour = tbContinuesRow
ButtonKind = bkButton
end
end
object SpkPane4: TSpkPane
Caption = 'Szukanie'
Visible = True
Items = (
'SpkLargeButton5'
'SpkSmallButton9'
'SpkSmallButton10'
)
object SpkLargeButton5: TSpkLargeButton
Visible = True
Enabled = True
Caption = 'Szukaj'
LargeImageIndex = 4
ButtonKind = bkButton
end
object SpkSmallButton9: TSpkSmallButton
Visible = True
Enabled = True
Caption = 'Szukaj dalej'
GroupBehaviour = gbSingleItem
HideFrameWhenIdle = False
ImageIndex = 41
ShowCaption = True
TableBehaviour = tbContinuesRow
ButtonKind = bkButton
end
object SpkSmallButton10: TSpkSmallButton
Visible = True
Enabled = True
Caption = 'Zamień'
GroupBehaviour = gbSingleItem
HideFrameWhenIdle = False
ImageIndex = 55
ShowCaption = True
TableBehaviour = tbBeginsRow
ButtonKind = bkButton
end
end
object SpkPane1: TSpkPane
Caption = 'Large buttons'
Visible = True
Items = (
'SpkLargeButton1'
'SpkLargeButton2'
'SpkLargeButton3'
)
object SpkLargeButton1: TSpkLargeButton
Visible = True
Enabled = True
Caption = 'Button'
LargeImageIndex = 0
ButtonKind = bkButton
DropdownMenu = PopupMenu2
end
object SpkLargeButton2: TSpkLargeButton
Visible = True
Enabled = True
Caption = 'ButtonDropdown'
LargeImageIndex = 1
ButtonKind = bkButtonDropdown
DropdownMenu = PopupMenu2
end
object SpkLargeButton3: TSpkLargeButton
Visible = True
Enabled = True
Caption = 'Dropdown'
LargeImageIndex = 2
ButtonKind = bkDropdown
@ -306,44 +237,29 @@ object Form2: TForm2
end
object SpkPane6: TSpkPane
Caption = 'Small buttons'
Visible = True
Items = (
'SpkSmallButton11'
'SpkSmallButton12'
'SpkSmallButton13'
)
object SpkSmallButton11: TSpkSmallButton
Visible = True
Enabled = True
Caption = 'Button'
GroupBehaviour = gbSingleItem
HideFrameWhenIdle = True
ImageIndex = 20
ShowCaption = True
TableBehaviour = tbContinuesRow
ButtonKind = bkButton
DropdownMenu = PopupMenu2
end
object SpkSmallButton12: TSpkSmallButton
Visible = True
Enabled = True
Caption = 'ButtonDropdown'
GroupBehaviour = gbSingleItem
HideFrameWhenIdle = True
ImageIndex = 21
ShowCaption = True
TableBehaviour = tbBeginsRow
ButtonKind = bkButtonDropdown
DropdownMenu = PopupMenu2
end
object SpkSmallButton13: TSpkSmallButton
Visible = True
Enabled = True
Caption = 'Dropdown'
GroupBehaviour = gbSingleItem
HideFrameWhenIdle = True
ImageIndex = 22
ShowCaption = True
TableBehaviour = tbBeginsRow
ButtonKind = bkDropdown
DropdownMenu = PopupMenu2
@ -395,40 +311,28 @@ object Form2: TForm2
CustomAppearance.Element.ActiveCaptionColor = 8405614
CustomAppearance.Element.Style = esRounded
Caption = 'Katalogi'
OverrideAppearance = False
Visible = True
Panes = (
'SpkPane5'
)
object SpkPane5: TSpkPane
Caption = 'Tafla'
Visible = True
Items = (
'SpkLargeButton6'
'SpkLargeButton7'
'SpkLargeButton8'
)
object SpkLargeButton6: TSpkLargeButton
Visible = True
Enabled = True
Caption = 'Blender'
LargeImageIndex = 2
ButtonKind = bkButton
end
object SpkLargeButton7: TSpkLargeButton
Visible = True
Enabled = True
Caption = 'Dokumenty'
LargeImageIndex = 1
ButtonKind = bkButton
DropdownMenu = PopupMenu1
end
object SpkLargeButton8: TSpkLargeButton
Visible = True
Enabled = True
Caption = 'Lazarus'
LargeImageIndex = 0
ButtonKind = bkButton
end
end
end

File diff suppressed because it is too large Load Diff