You've already forked lazarus-ccr
spktoolbar: improved internal layout of small buttons
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5984 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -1234,12 +1234,12 @@ begin
|
|||||||
// Text
|
// Text
|
||||||
if FButtonKind in [bkButton, bkToggle] then
|
if FButtonKind in [bkButton, bkToggle] then
|
||||||
begin
|
begin
|
||||||
// £amiemy etykietê
|
// Label
|
||||||
FindBreakPlace(FCaption,BreakPos,RowWidth);
|
FindBreakPlace(FCaption,BreakPos,RowWidth);
|
||||||
TextWidth := 2 * LargeButtonCaptionHMargin + RowWidth;
|
TextWidth := 2 * LargeButtonCaptionHMargin + RowWidth;
|
||||||
end else
|
end else
|
||||||
begin
|
begin
|
||||||
// Nie ³amiemy etykiety
|
// do not break the label
|
||||||
Bitmap.Canvas.Font.Assign(FAppearance.Element.CaptionFont);
|
Bitmap.Canvas.Font.Assign(FAppearance.Element.CaptionFont);
|
||||||
SpkScaleFont(Bitmap.Canvas.Font);
|
SpkScaleFont(Bitmap.Canvas.Font);
|
||||||
TextWidth := 2 * LargeButtonCaptionHMargin + Bitmap.Canvas.TextWidth(FCaption);
|
TextWidth := 2 * LargeButtonCaptionHMargin + Bitmap.Canvas.TextWidth(FCaption);
|
||||||
|
@ -28,7 +28,7 @@ const
|
|||||||
// ****************
|
// ****************
|
||||||
|
|
||||||
LARGEBUTTON_DROPDOWN_FIELD_SIZE = 29;
|
LARGEBUTTON_DROPDOWN_FIELD_SIZE = 29;
|
||||||
LARGEBUTTON_GLYPH_MARGIN = 1;
|
LARGEBUTTON_GLYPH_MARGIN = 2;
|
||||||
LARGEBUTTON_CAPTION_HMARGIN = 3;
|
LARGEBUTTON_CAPTION_HMARGIN = 3;
|
||||||
LARGEBUTTON_MIN_WIDTH = 24;
|
LARGEBUTTON_MIN_WIDTH = 24;
|
||||||
LARGEBUTTON_RADIUS = 4;
|
LARGEBUTTON_RADIUS = 4;
|
||||||
@ -40,7 +40,7 @@ const
|
|||||||
SMALLBUTTON_GLYPH_WIDTH = 16; //was: 20; //16;
|
SMALLBUTTON_GLYPH_WIDTH = 16; //was: 20; //16;
|
||||||
SMALLBUTTON_BORDER_WIDTH = 2;
|
SMALLBUTTON_BORDER_WIDTH = 2;
|
||||||
SMALLBUTTON_HALF_BORDER_WIDTH = 1;
|
SMALLBUTTON_HALF_BORDER_WIDTH = 1;
|
||||||
SMALLBUTTON_PADDING = 2;
|
SMALLBUTTON_PADDING = 4; // was: 2
|
||||||
SMALLBUTTON_DROPDOWN_WIDTH = 11;
|
SMALLBUTTON_DROPDOWN_WIDTH = 11;
|
||||||
SMALLBUTTON_RADIUS = 4;
|
SMALLBUTTON_RADIUS = 4;
|
||||||
|
|
||||||
|
@ -7,8 +7,12 @@
|
|||||||
<SessionStorage Value="InProjectDir"/>
|
<SessionStorage Value="InProjectDir"/>
|
||||||
<MainUnit Value="0"/>
|
<MainUnit Value="0"/>
|
||||||
<Title Value="project1"/>
|
<Title Value="project1"/>
|
||||||
|
<Scaled Value="True"/>
|
||||||
<ResourceType Value="res"/>
|
<ResourceType Value="res"/>
|
||||||
<UseXPManifest Value="True"/>
|
<UseXPManifest Value="True"/>
|
||||||
|
<XPManifest>
|
||||||
|
<DpiAware Value="True"/>
|
||||||
|
</XPManifest>
|
||||||
</General>
|
</General>
|
||||||
<i18n>
|
<i18n>
|
||||||
<EnableI18N LFM="False"/>
|
<EnableI18N LFM="False"/>
|
||||||
|
@ -7,12 +7,15 @@ uses
|
|||||||
cthreads,
|
cthreads,
|
||||||
{$ENDIF}{$ENDIF}
|
{$ENDIF}{$ENDIF}
|
||||||
Interfaces, // this includes the LCL widgetset
|
Interfaces, // this includes the LCL widgetset
|
||||||
Forms, Unit1, Unit2
|
LCLVersion, Forms, Unit1, Unit2
|
||||||
{ you can add units after this };
|
{ you can add units after this };
|
||||||
|
|
||||||
{$R *.res}
|
{$R *.res}
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
{$IF lcl_fullversion >= 1080000}
|
||||||
|
Application.Scaled := True;
|
||||||
|
{$ENDIF}
|
||||||
RequireDerivedFormResource := True;
|
RequireDerivedFormResource := True;
|
||||||
Application.Initialize;
|
Application.Initialize;
|
||||||
Application.CreateForm(TForm1, Form1);
|
Application.CreateForm(TForm1, Form1);
|
||||||
|
@ -9,7 +9,7 @@ object Form1: TForm1
|
|||||||
Menu = MainMenu
|
Menu = MainMenu
|
||||||
OnCloseQuery = FormCloseQuery
|
OnCloseQuery = FormCloseQuery
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
LCLVersion = '1.6.4.0'
|
LCLVersion = '1.9.0.0'
|
||||||
object ToolBar1: TToolBar
|
object ToolBar1: TToolBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 26
|
Height = 26
|
||||||
@ -33,73 +33,70 @@ object Form1: TForm1
|
|||||||
Left = 47
|
Left = 47
|
||||||
Height = 22
|
Height = 22
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 10
|
|
||||||
Caption = 'ToolButton3'
|
Caption = 'ToolButton3'
|
||||||
Style = tbsDivider
|
Style = tbsDivider
|
||||||
end
|
end
|
||||||
object ToolButton4: TToolButton
|
object ToolButton4: TToolButton
|
||||||
Left = 57
|
Left = 52
|
||||||
Top = 0
|
Top = 0
|
||||||
Action = AcEditCut
|
Action = AcEditCut
|
||||||
end
|
end
|
||||||
object ToolButton5: TToolButton
|
object ToolButton5: TToolButton
|
||||||
Left = 80
|
Left = 75
|
||||||
Top = 0
|
Top = 0
|
||||||
Action = AcEditCopy
|
Action = AcEditCopy
|
||||||
end
|
end
|
||||||
object ToolButton6: TToolButton
|
object ToolButton6: TToolButton
|
||||||
Left = 103
|
Left = 98
|
||||||
Top = 0
|
Top = 0
|
||||||
Action = AcEditPaste
|
Action = AcEditPaste
|
||||||
end
|
end
|
||||||
object ToolButton7: TToolButton
|
object ToolButton7: TToolButton
|
||||||
Left = 126
|
Left = 121
|
||||||
Height = 22
|
Height = 22
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 10
|
|
||||||
Caption = 'ToolButton7'
|
Caption = 'ToolButton7'
|
||||||
Style = tbsDivider
|
Style = tbsDivider
|
||||||
end
|
end
|
||||||
object ToolButton8: TToolButton
|
object ToolButton8: TToolButton
|
||||||
Left = 282
|
Left = 269
|
||||||
Top = 0
|
Top = 0
|
||||||
Action = AcQuit
|
Action = AcQuit
|
||||||
end
|
end
|
||||||
object ToolButton9: TToolButton
|
object ToolButton9: TToolButton
|
||||||
Left = 136
|
Left = 126
|
||||||
Top = 0
|
Top = 0
|
||||||
Action = AcBold
|
Action = AcBold
|
||||||
end
|
end
|
||||||
object ToolButton10: TToolButton
|
object ToolButton10: TToolButton
|
||||||
Left = 159
|
Left = 149
|
||||||
Top = 0
|
Top = 0
|
||||||
Action = AcItalic
|
Action = AcItalic
|
||||||
end
|
end
|
||||||
object ToolButton11: TToolButton
|
object ToolButton11: TToolButton
|
||||||
Left = 205
|
Left = 195
|
||||||
Top = 0
|
Top = 0
|
||||||
Action = AcLeftJustify
|
Action = AcLeftJustify
|
||||||
end
|
end
|
||||||
object ToolButton12: TToolButton
|
object ToolButton12: TToolButton
|
||||||
Left = 182
|
Left = 172
|
||||||
Top = 0
|
Top = 0
|
||||||
Action = AcUnderline
|
Action = AcUnderline
|
||||||
end
|
end
|
||||||
object ToolButton13: TToolButton
|
object ToolButton13: TToolButton
|
||||||
Left = 228
|
Left = 218
|
||||||
Top = 0
|
Top = 0
|
||||||
Action = AcCenter
|
Action = AcCenter
|
||||||
end
|
end
|
||||||
object ToolButton14: TToolButton
|
object ToolButton14: TToolButton
|
||||||
Left = 251
|
Left = 241
|
||||||
Top = 0
|
Top = 0
|
||||||
Action = AcRightJustify
|
Action = AcRightJustify
|
||||||
end
|
end
|
||||||
object ToolButton15: TToolButton
|
object ToolButton15: TToolButton
|
||||||
Left = 274
|
Left = 264
|
||||||
Height = 22
|
Height = 22
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 8
|
|
||||||
Caption = 'ToolButton15'
|
Caption = 'ToolButton15'
|
||||||
Style = tbsDivider
|
Style = tbsDivider
|
||||||
end
|
end
|
||||||
@ -164,7 +161,7 @@ object Form1: TForm1
|
|||||||
Appearance.Element.ActiveInnerDarkColor = 961020
|
Appearance.Element.ActiveInnerDarkColor = 961020
|
||||||
Appearance.Element.ActiveCaptionColor = 8405614
|
Appearance.Element.ActiveCaptionColor = 8405614
|
||||||
Appearance.Element.Style = esRounded
|
Appearance.Element.Style = esRounded
|
||||||
TabIndex = 0
|
TabIndex = 4
|
||||||
Images = ImageList
|
Images = ImageList
|
||||||
LargeImages = LargeImageList
|
LargeImages = LargeImageList
|
||||||
Tabs = (
|
Tabs = (
|
||||||
@ -681,7 +678,7 @@ object Form1: TForm1
|
|||||||
'SpkPane4'
|
'SpkPane4'
|
||||||
)
|
)
|
||||||
object SpkPane4: TSpkPane
|
object SpkPane4: TSpkPane
|
||||||
Caption = 'Pane'
|
Caption = 'Info'
|
||||||
Visible = True
|
Visible = True
|
||||||
Items = (
|
Items = (
|
||||||
'SpkLargeButton4'
|
'SpkLargeButton4'
|
||||||
|
Reference in New Issue
Block a user