mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-06 07:58:07 +02:00
IconFinder: Display icon count. Update demo projects.
(cherry picked from commit 3788e25cc6
)
This commit is contained in:
parent
33b4d31618
commit
2d81368339
@ -12,7 +12,6 @@
|
||||
<XPManifest>
|
||||
<DpiAware Value="True"/>
|
||||
</XPManifest>
|
||||
<Icon Value="0"/>
|
||||
</General>
|
||||
<BuildModes>
|
||||
<Item Name="Default" Default="True"/>
|
||||
|
Binary file not shown.
@ -6,7 +6,7 @@ object MainForm: TMainForm
|
||||
Caption = 'MainForm'
|
||||
ClientHeight = 404
|
||||
ClientWidth = 426
|
||||
LCLVersion = '3.99.0.0'
|
||||
LCLVersion = '4.99.0.0'
|
||||
object PaintBox1: TPaintBox
|
||||
Left = 11
|
||||
Height = 383
|
||||
|
@ -5,6 +5,7 @@ unit main;
|
||||
interface
|
||||
|
||||
uses
|
||||
LazLogger,
|
||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls, ImgList,
|
||||
StdCtrls, Types, IconThumbnails;
|
||||
|
||||
|
@ -12,7 +12,6 @@
|
||||
<XPManifest>
|
||||
<DpiAware Value="True"/>
|
||||
</XPManifest>
|
||||
<Icon Value="0"/>
|
||||
</General>
|
||||
<BuildModes>
|
||||
<Item Name="Default" Default="True"/>
|
||||
|
@ -17,7 +17,7 @@ uses
|
||||
|
||||
begin
|
||||
RequireDerivedFormResource:=True;
|
||||
Application.Scaled := True;
|
||||
Application.Scaled:=True;
|
||||
Application.{%H-}MainFormOnTaskbar:=True;
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TMainForm, MainForm);
|
||||
|
Binary file not shown.
@ -9,14 +9,12 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 3.4.4\n"
|
||||
"X-Generator: Poedit 3.5\n"
|
||||
|
||||
#: iconfinderstrconsts.rsfolders_add
|
||||
#, fuzzy
|
||||
#| msgid "Add..."
|
||||
msgctxt "iconfinderstrconsts.rsfolders_add"
|
||||
msgid "Add ..."
|
||||
msgstr "Neu..."
|
||||
msgstr "Neu ..."
|
||||
|
||||
#: iconfinderstrconsts.rsfolders_confirmdeletefoldermsg
|
||||
msgctxt "iconfinderstrconsts.rsfolders_confirmdeletefoldermsg"
|
||||
@ -69,11 +67,9 @@ msgid "Enter/edit a keyword filter"
|
||||
msgstr "Filter nach Suchbegriffen eingeben/bearbeiten"
|
||||
|
||||
#: iconfinderstrconsts.rsiconviewer_enterkeywordshere
|
||||
#, fuzzy
|
||||
#| msgid "Enter keywords here..."
|
||||
msgctxt "iconfinderstrconsts.rsiconviewer_enterkeywordshere"
|
||||
msgid "Enter keywords here"
|
||||
msgstr "Suchbegriffe hier eintragen..."
|
||||
msgstr "Suchbegriffe hier eintragen"
|
||||
|
||||
#: iconfinderstrconsts.rsiconviewer_expressiontofilterbykeywordshint
|
||||
msgctxt "iconfinderstrconsts.rsiconviewer_expressiontofilterbykeywordshint"
|
||||
@ -96,8 +92,6 @@ msgid "Filter by icon style"
|
||||
msgstr "Nach Icon-Stil filtern"
|
||||
|
||||
#: iconfinderstrconsts.rsiconviewer_filterbykeywordshint
|
||||
#, fuzzy
|
||||
#| msgid "Filters by keywords"
|
||||
msgctxt "iconfinderstrconsts.rsiconviewer_filterbykeywordshint"
|
||||
msgid "Filter by keywords"
|
||||
msgstr "Nach Suchbegriffen filtern"
|
||||
@ -107,6 +101,11 @@ msgctxt "iconfinderstrconsts.rsiconviewer_hideall"
|
||||
msgid "Hide all"
|
||||
msgstr "Alle verbergen"
|
||||
|
||||
#: iconfinderstrconsts.rsiconviewer_iconcountinfo
|
||||
#, object-pascal-format
|
||||
msgid "%0:d icons (out of %1:d)"
|
||||
msgstr "%0:d Icons (von %1:d)"
|
||||
|
||||
#: iconfinderstrconsts.rsiconviewer_keywordslbl
|
||||
msgctxt "iconfinderstrconsts.rsiconviewer_keywordslbl"
|
||||
msgid "Keywords:"
|
||||
@ -193,8 +192,6 @@ msgid "(any style)"
|
||||
msgstr "(beliebig)"
|
||||
|
||||
#: iconfinderstrconsts.rsmetadata_caption
|
||||
#, fuzzy
|
||||
#| msgid "Edit Icon Metadata"
|
||||
msgctxt "iconfinderstrconsts.rsmetadata_caption"
|
||||
msgid "Icon Metadata Editor"
|
||||
msgstr "Icon-Metadaten bearbeiten"
|
||||
@ -228,4 +225,3 @@ msgstr "Außenlinie"
|
||||
msgctxt "iconfinderstrconsts.rsmetadata_style"
|
||||
msgid "Style"
|
||||
msgstr "Stil"
|
||||
|
||||
|
@ -74,6 +74,11 @@ msgstr ""
|
||||
msgid "Hide all"
|
||||
msgstr ""
|
||||
|
||||
#: iconfinderstrconsts.rsiconviewer_iconcountinfo
|
||||
#, object-pascal-format
|
||||
msgid "%0:d icons (out of %1:d)"
|
||||
msgstr ""
|
||||
|
||||
#: iconfinderstrconsts.rsiconviewer_keywordslbl
|
||||
msgid "Keywords:"
|
||||
msgstr ""
|
||||
|
@ -85,6 +85,11 @@ msgstr "Фильтровать по ключевым словам"
|
||||
msgid "Hide all"
|
||||
msgstr "Скрыть все"
|
||||
|
||||
#: iconfinderstrconsts.rsiconviewer_iconcountinfo
|
||||
#, object-pascal-format
|
||||
msgid "%0:d icons (out of %1:d)"
|
||||
msgstr ""
|
||||
|
||||
#: iconfinderstrconsts.rsiconviewer_keywordslbl
|
||||
msgid "Keywords:"
|
||||
msgstr "Ключевые слова:"
|
||||
|
@ -54,10 +54,13 @@
|
||||
<EnableI18N Value="True"/>
|
||||
<OutDir Value="..\..\languages"/>
|
||||
</i18n>
|
||||
<RequiredPkgs Count="1">
|
||||
<RequiredPkgs Count="2">
|
||||
<Item1>
|
||||
<PackageName Value="LCL"/>
|
||||
<PackageName Value="LazControlDsgn"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item2>
|
||||
</RequiredPkgs>
|
||||
<UsageOptions>
|
||||
<UnitPath Value="$(PkgOutDir)"/>
|
||||
|
@ -26,6 +26,7 @@ resourcestring
|
||||
RSIconViewer_StyleLbl = 'Style:';
|
||||
RSIconViewer_KeywordsLbl = 'Keywords:';
|
||||
RSIconViewer_ConfirmDeleteIconMsg = 'Do you really want to delete the selected icon from the library?';
|
||||
RSIconViewer_IconCountInfo = '%0:d icons (out of %1:d)';
|
||||
|
||||
// IconFinderMetadata
|
||||
RSMetadata_Caption = 'Icon Metadata Editor';
|
||||
|
@ -118,8 +118,8 @@ object IconViewerFrame: TIconViewerFrame
|
||||
end
|
||||
object IconDetailsPanel: TPanel
|
||||
Left = 6
|
||||
Height = 68
|
||||
Top = 223
|
||||
Height = 87
|
||||
Top = 204
|
||||
Width = 594
|
||||
Align = alBottom
|
||||
AutoSize = True
|
||||
@ -127,16 +127,17 @@ object IconViewerFrame: TIconViewerFrame
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 6
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 68
|
||||
ClientHeight = 87
|
||||
ClientWidth = 594
|
||||
TabOrder = 1
|
||||
OnResize = IconDetailsPanelResize
|
||||
object CaptionPanel: TPanel
|
||||
AnchorSideLeft.Control = IconDetailsPanel
|
||||
AnchorSideTop.Control = IconDetailsPanel
|
||||
AnchorSideTop.Control = DividerBevel1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 68
|
||||
Top = 0
|
||||
Top = 19
|
||||
Width = 58
|
||||
AutoSize = True
|
||||
BorderSpacing.Right = 8
|
||||
@ -199,10 +200,12 @@ object IconViewerFrame: TIconViewerFrame
|
||||
object infoFileName: TLabel
|
||||
AnchorSideLeft.Control = CaptionPanel
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = DividerBevel1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 66
|
||||
Height = 15
|
||||
Top = 0
|
||||
Top = 19
|
||||
Width = 71
|
||||
Caption = 'infoFileName'
|
||||
end
|
||||
@ -213,7 +216,7 @@ object IconViewerFrame: TIconViewerFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 66
|
||||
Height = 15
|
||||
Top = 17
|
||||
Top = 36
|
||||
Width = 41
|
||||
BorderSpacing.Top = 2
|
||||
Caption = 'infoSize'
|
||||
@ -225,7 +228,7 @@ object IconViewerFrame: TIconViewerFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 66
|
||||
Height = 15
|
||||
Top = 34
|
||||
Top = 53
|
||||
Width = 46
|
||||
BorderSpacing.Top = 2
|
||||
Caption = 'infoStyle'
|
||||
@ -239,21 +242,24 @@ object IconViewerFrame: TIconViewerFrame
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 66
|
||||
Height = 15
|
||||
Top = 51
|
||||
Top = 70
|
||||
Width = 528
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 2
|
||||
Caption = 'infoKeywords'
|
||||
WordWrap = True
|
||||
end
|
||||
end
|
||||
object Bevel1: TBevel
|
||||
Left = 0
|
||||
Height = 4
|
||||
Top = 213
|
||||
Width = 606
|
||||
Align = alBottom
|
||||
Shape = bsBottomLine
|
||||
object DividerBevel1: TDividerBevel
|
||||
Left = 0
|
||||
Height = 15
|
||||
Top = 0
|
||||
Width = 594
|
||||
Caption = 'DividerBevel1'
|
||||
Align = alTop
|
||||
BorderSpacing.Bottom = 4
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
end
|
||||
object Bevel2: TBevel
|
||||
Left = 0
|
||||
|
@ -24,8 +24,9 @@ uses
|
||||
Classes, SysUtils,
|
||||
// LazUtils
|
||||
LazFileUtils, LazLoggerBase,
|
||||
// LCL
|
||||
Forms, Controls, Graphics, StdCtrls, ExtCtrls, FileCtrl, Buttons, Dialogs, ImgList,
|
||||
// LCL/LazControls
|
||||
Forms, Controls, Graphics, StdCtrls, ExtCtrls, FileCtrl, Buttons, Dialogs,
|
||||
ImgList, DividerBevel,
|
||||
// Icon Finder
|
||||
IconFinderStrConsts, IconThumbnails, IconKeywordFilterEditor;
|
||||
|
||||
@ -34,12 +35,12 @@ type
|
||||
{ TIconViewerFrame }
|
||||
|
||||
TIconViewerFrame = class(TFrame)
|
||||
Bevel1: TBevel;
|
||||
Bevel2: TBevel;
|
||||
btnKeywordEditor: TSpeedButton;
|
||||
cmbFilterByKeywords: TComboBox;
|
||||
cmbFilterBySize: TComboBox;
|
||||
cmbFilterByStyle: TComboBox;
|
||||
DividerBevel1: TDividerBevel;
|
||||
FilterPanel: TPanel;
|
||||
infoFileName: TLabel;
|
||||
infoKeywords: TLabel;
|
||||
@ -95,6 +96,7 @@ type
|
||||
function IndexOfIconFolder(AFolder: String): Integer;
|
||||
procedure ReadIconFolders(AList: TStrings);
|
||||
procedure SetKeywordsHistory(AList: TStrings);
|
||||
procedure UpdateIconCount;
|
||||
procedure UpdateIconSizes(ASizeIndex: Integer);
|
||||
procedure UpdateIconStyles(AStyleIndex: Integer);
|
||||
procedure UpdateLanguage;
|
||||
@ -155,6 +157,7 @@ begin
|
||||
UpdateIconSizes(filterBySize);
|
||||
UpdateIconStyles(filterByStyle);
|
||||
UpdateIconDetails;
|
||||
UpdateIconCount;
|
||||
UpdateCmds;
|
||||
end;
|
||||
|
||||
@ -216,6 +219,7 @@ begin
|
||||
FIconViewer.FilterByIconKeywords := filter;
|
||||
AddKeywordFilterToHistory(filter);
|
||||
cmbFilterByKeywords.Text := filter; // Must be after AddKeywordFilterToHistory!
|
||||
UpdateIconCount;
|
||||
end;
|
||||
|
||||
procedure TIconViewerFrame.cmbFilterByKeywordsEditingDone(Sender: TObject);
|
||||
@ -230,12 +234,14 @@ begin
|
||||
else
|
||||
FIconViewer.FilterByIconSize := cmbFilterBySize.Items[cmbFilterBySize.ItemIndex];
|
||||
FIconViewer.Invalidate;
|
||||
UpdateIconCount;
|
||||
end;
|
||||
|
||||
procedure TIconViewerFrame.cmbFilterByStyleChange(Sender: TObject);
|
||||
begin
|
||||
FIconViewer.FilterByIconStyle := TIconStyle(cmbFilterByStyle.ItemIndex);
|
||||
FIconViewer.Invalidate;
|
||||
UpdateIconCount;
|
||||
end;
|
||||
|
||||
procedure TIconViewerFrame.CopyMetadataToNameBase(AIcon: TIconItem);
|
||||
@ -265,6 +271,7 @@ end;
|
||||
|
||||
procedure TIconViewerFrame.DoIconViewerFilter(Sender: TObject);
|
||||
begin
|
||||
UpdateIconCount;
|
||||
if Assigned(FOnFilter) then
|
||||
FOnFilter(Self);
|
||||
end;
|
||||
@ -422,6 +429,13 @@ begin
|
||||
btnKeywordEditor.Enabled := TotalCount > 0;
|
||||
end;
|
||||
|
||||
procedure TIconViewerFrame.UpdateIconCount;
|
||||
begin
|
||||
DividerBevel1.Caption := Format(RSIconViewer_IconCountInfo,
|
||||
[ FIconViewer.ThumbnailCount, FIconViewer.IconCount ]
|
||||
);
|
||||
end;
|
||||
|
||||
procedure TIconViewerFrame.UpdateIconDetails;
|
||||
var
|
||||
keywordList: TStrings;
|
||||
|
@ -2,9 +2,9 @@ object IconFinderSettingsFrame: TIconFinderSettingsFrame
|
||||
Left = 0
|
||||
Height = 230
|
||||
Top = 0
|
||||
Width = 372
|
||||
Width = 433
|
||||
ClientHeight = 230
|
||||
ClientWidth = 372
|
||||
ClientWidth = 433
|
||||
ParentFont = False
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
@ -15,7 +15,7 @@ object IconFinderSettingsFrame: TIconFinderSettingsFrame
|
||||
Left = 0
|
||||
Height = 22
|
||||
Top = 0
|
||||
Width = 372
|
||||
Width = 433
|
||||
AutoSize = True
|
||||
Caption = 'ToolBar'
|
||||
EdgeBorders = []
|
||||
|
Loading…
Reference in New Issue
Block a user