Skip to content
Permalink
Browse files

Issue #553: Add registry hack for enabling (yet ugly) toolbar captions

  • Loading branch information...
ansgarbecker committed Mar 2, 2019
1 parent bfcb7c2 commit 187fd511260bed063e239926a03152f39adfd4d7
Showing with 16 additions and 1 deletion.
  1. +2 −1 source/apphelpers.pas
  2. +14 −0 source/main.pas
@@ -136,7 +136,7 @@ TQueryThread = class(TThread)
asSQLColMatchingBraceForeground, asSQLColMatchingBraceBackground,
asMaxColWidth, asDatagridMaximumRows, asDatagridRowsPerStep, asGridRowLineCount, asReuseEditorConfiguration,
asLogToFile, asMainWinMaximized, asMainWinLeft, asMainWinTop, asMainWinWidth,
asMainWinHeight, asMainWinOnMonitor, asCoolBandIndex, asCoolBandBreak, asCoolBandWidth, asQuerymemoheight, asDbtreewidth,
asMainWinHeight, asMainWinOnMonitor, asCoolBandIndex, asCoolBandBreak, asCoolBandWidth, asToolbarShowCaptions, asQuerymemoheight, asDbtreewidth,
asDataPreviewHeight, asDataPreviewEnabled, asLogHeight, asQueryhelperswidth, asStopOnErrorsInBatchMode,
asWrapLongLines, asDisplayBLOBsAsText, asSingleQueries, asMemoEditorWidth, asMemoEditorHeight, asMemoEditorMaximized,
asMemoEditorWrap, asDelimiter, asSQLHelpWindowLeft, asSQLHelpWindowTop, asSQLHelpWindowWidth,
@@ -3454,6 +3454,7 @@ constructor TAppSettings.Create;
InitSetting(asCoolBandIndex, 'CoolBand%sIndex', 0);
InitSetting(asCoolBandBreak, 'CoolBand%sBreak', 0, True);
InitSetting(asCoolBandWidth, 'CoolBand%sWidth', 0);
InitSetting(asToolbarShowCaptions, 'ToolbarShowCaptions', 0, False);
InitSetting(asQuerymemoheight, 'querymemoheight', 100);
InitSetting(asDbtreewidth, 'dbtreewidth', 270);
InitSetting(asDataPreviewHeight, 'DataPreviewHeight', 100);
@@ -1612,6 +1612,20 @@ procedure TMainForm.FormCreate(Sender: TObject);

MainMenu1.Images := VirtualImageListMain;

if AppSettings.ReadBool(asToolbarShowCaptions) then begin
for i:=0 to ToolBarMainButtons.ButtonCount-1 do begin
if ToolBarMainButtons.Buttons[i].Style = tbsSeparator then
Continue;
ToolBarMainButtons.Buttons[i].AutoSize := True;
//ToolBarMainButtons.Buttons[i].AutoSize := False;
//ToolBarMainButtons.Buttons[i].Width := 25;
ToolBarMainButtons.Buttons[i].Style := tbsTextButton;
end;
//ToolBarMainButtons.AllowTextButtons := True;
//ToolBarMainButtons.List := True;
ToolBarMainButtons.ShowCaptions := true;
end;

// Translate menu items
menuQueryHelpersGenerateSelect.Caption := f_('Generate %s ...', ['SELECT']);
menuQueryHelpersGenerateInsert.Caption := f_('Generate %s ...', ['INSERT']);

0 comments on commit 187fd51

Please sign in to comment.
You can’t perform that action at this time.