Changeset 139 for trunk


Ignore:
Timestamp:
Dec 2, 2016, 2:05:27 PM (7 years ago)
Author:
chronos
Message:
  • Modified: Use CoolBar with mutliple bands instead of one toolbar with separators.
Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.lfm

    r138 r139  
    11object FormMain: TFormMain
    2   Left = 526
     2  Left = 495
    33  Height = 447
    4   Top = 394
     4  Top = 424
    55  Width = 782
    66  Caption = 'Acronym Decoder'
     
    1717  object PanelMain: TPanel
    1818    Left = 0
    19     Height = 366
    20     Top = 56
     19    Height = 360
     20    Top = 62
    2121    Width = 782
    2222    Align = alClient
    2323    BevelOuter = bvNone
    24     ClientHeight = 366
     24    ClientHeight = 360
    2525    ClientWidth = 782
    26     TabOrder = 1
     26    TabOrder = 0
    2727    object ListViewFilter1: TListViewFilter
    2828      Left = 8
     
    3535    object ListViewAcronyms: TListView
    3636      Left = 8
    37       Height = 324
     37      Height = 318
    3838      Top = 35
    3939      Width = 767
     
    6262    end
    6363  end
    64   object ToolBar1: TToolBar
    65     Left = 0
    66     Height = 26
    67     Top = 0
    68     Width = 782
    69     Caption = 'ToolBar1'
    70     Images = Core.ImageList1
    71     ParentShowHint = False
    72     ShowHint = True
    73     TabOrder = 0
    74     object ToolButton1: TToolButton
    75       Left = 1
    76       Top = 2
    77       Action = AFileNew
    78     end
    79     object ToolButton2: TToolButton
    80       Left = 110
    81       Top = 2
    82       Action = AShowAcronyms
    83     end
    84     object ToolButton3: TToolButton
    85       Left = 133
    86       Top = 2
    87       Action = AShowCategories
    88     end
    89     object ToolButton4: TToolButton
    90       Left = 179
    91       Top = 2
    92       Action = AShowImportFormats
    93     end
    94     object ToolButton5: TToolButton
    95       Left = 156
    96       Top = 2
    97       Action = AShowImportSources
    98     end
    99     object ToolButton6: TToolButton
    100       Left = 24
    101       Top = 2
    102       Action = AFileOpen
    103       DropdownMenu = PopupMenuOpenRecent
    104       Style = tbsDropDown
    105     end
    106     object ToolButton7: TToolButton
    107       Left = 59
    108       Top = 2
    109       Action = AFileSave
    110     end
    111     object ToolButton8: TToolButton
    112       Left = 105
    113       Height = 22
    114       Top = 2
    115       Width = 5
    116       Style = tbsDivider
    117     end
    118     object ToolButton9: TToolButton
    119       Left = 202
    120       Top = 2
    121       Action = AProcessImports
    122     end
    123     object ToolButton10: TToolButton
    124       Left = 225
    125       Height = 22
    126       Top = 2
    127       Width = 5
    128       Style = tbsDivider
    129     end
    130     object ToolButton11: TToolButton
    131       Left = 230
    132       Top = 2
    133       Action = ASettings
    134     end
    135     object ToolButton12: TToolButton
    136       Left = 82
    137       Top = 2
    138       Action = AFileClose
    139     end
    140     object ToolButton14: TToolButton
    141       Left = 253
    142       Height = 22
    143       Top = 2
    144       Width = 5
    145       Style = tbsDivider
    146     end
    147     object ToolButton16: TToolButton
    148       Left = 258
    149       Top = 2
    150       Action = AFilterSameLength
    151       Style = tbsCheck
    152     end
    153     object ToolButton13: TToolButton
    154       Left = 281
    155       Top = 2
    156       Action = AFilterSameLetterCase
    157       Style = tbsCheck
    158     end
    159   end
    16064  object PanelParam: TPanel
    16165    Left = 0
    16266    Height = 30
    163     Top = 26
     67    Top = 32
    16468    Width = 782
    16569    Align = alTop
     
    16771    ClientHeight = 30
    16872    ClientWidth = 782
    169     TabOrder = 2
     73    TabOrder = 1
    17074    object CheckBoxExactLength: TCheckBox
    17175      Left = 8
     
    18387      Action = AFilterSameLetterCase
    18488      TabOrder = 1
     89    end
     90  end
     91  object CoolBar1: TCoolBar
     92    Left = 0
     93    Height = 32
     94    Top = 0
     95    Width = 782
     96    AutoSize = True
     97    Bands = <   
     98      item
     99        Break = False
     100        Control = ToolBar1
     101        FixedSize = True
     102        MinWidth = 40
     103        Width = 136
     104      end   
     105      item
     106        Break = False
     107        Control = ToolBar2
     108        FixedSize = True
     109        MinWidth = 40
     110        Width = 126
     111      end   
     112      item
     113        Break = False
     114        Control = ToolBar3
     115        FixedSize = True
     116        MinWidth = 40
     117        Width = 80
     118      end   
     119      item
     120        Break = False
     121        Control = ToolBar4
     122        FixedSize = True
     123        MinWidth = 40
     124        Width = 80
     125      end>
     126    Images = Core.ImageList1
     127    object ToolBar1: TToolBar
     128      AnchorSideLeft.Control = CoolBar1
     129      AnchorSideTop.Control = CoolBar1
     130      Left = 24
     131      Height = 22
     132      Top = 5
     133      Width = 105
     134      Align = alNone
     135      AutoSize = True
     136      BorderSpacing.Left = 22
     137      BorderSpacing.Top = 3
     138      EdgeBorders = []
     139      EdgeInner = esNone
     140      EdgeOuter = esNone
     141      Images = Core.ImageList1
     142      ParentShowHint = False
     143      ShowHint = True
     144      TabOrder = 0
     145      Transparent = True
     146      object ToolButton1: TToolButton
     147        Left = 1
     148        Top = 0
     149        Action = AFileNew
     150      end
     151      object ToolButton6: TToolButton
     152        Left = 24
     153        Top = 0
     154        Action = AFileOpen
     155        DropdownMenu = PopupMenuOpenRecent
     156        Style = tbsDropDown
     157      end
     158      object ToolButton7: TToolButton
     159        Left = 59
     160        Top = 0
     161        Action = AFileSave
     162      end
     163      object ToolButton12: TToolButton
     164        Left = 82
     165        Top = 0
     166        Action = AFileClose
     167      end
     168    end
     169    object ToolBar2: TToolBar
     170      AnchorSideLeft.Control = CoolBar1
     171      AnchorSideTop.Control = CoolBar1
     172      Left = 160
     173      Height = 22
     174      Top = 5
     175      Width = 93
     176      Align = alNone
     177      AutoSize = True
     178      BorderSpacing.Left = 158
     179      BorderSpacing.Top = 3
     180      EdgeBorders = []
     181      EdgeInner = esNone
     182      EdgeOuter = esNone
     183      Images = Core.ImageList1
     184      ParentShowHint = False
     185      ShowHint = True
     186      TabOrder = 1
     187      Transparent = True
     188      object ToolButton2: TToolButton
     189        Left = 1
     190        Top = 0
     191        Action = AShowAcronyms
     192      end
     193      object ToolButton3: TToolButton
     194        Left = 24
     195        Top = 0
     196        Action = AShowCategories
     197      end
     198      object ToolButton5: TToolButton
     199        Left = 47
     200        Top = 0
     201        Action = AShowImportSources
     202      end
     203      object ToolButton4: TToolButton
     204        Left = 70
     205        Top = 0
     206        Action = AShowImportFormats
     207      end
     208    end
     209    object ToolBar3: TToolBar
     210      AnchorSideLeft.Control = CoolBar1
     211      AnchorSideTop.Control = CoolBar1
     212      Left = 286
     213      Height = 22
     214      Top = 5
     215      Width = 47
     216      Align = alNone
     217      AutoSize = True
     218      BorderSpacing.Left = 284
     219      BorderSpacing.Top = 3
     220      EdgeBorders = []
     221      EdgeInner = esNone
     222      EdgeOuter = esNone
     223      Images = Core.ImageList1
     224      ParentShowHint = False
     225      ShowHint = True
     226      TabOrder = 2
     227      Transparent = True
     228      object ToolButton11: TToolButton
     229        Left = 24
     230        Top = 0
     231        Action = ASettings
     232      end
     233      object ToolButton9: TToolButton
     234        Left = 1
     235        Top = 0
     236        Action = AProcessImports
     237      end
     238    end
     239    object ToolBar4: TToolBar
     240      AnchorSideLeft.Control = CoolBar1
     241      AnchorSideTop.Control = CoolBar1
     242      Left = 366
     243      Height = 22
     244      Top = 5
     245      Width = 47
     246      Align = alNone
     247      AutoSize = True
     248      BorderSpacing.Left = 364
     249      BorderSpacing.Top = 3
     250      EdgeBorders = []
     251      EdgeInner = esNone
     252      EdgeOuter = esNone
     253      Images = Core.ImageList1
     254      ParentShowHint = False
     255      ShowHint = True
     256      TabOrder = 3
     257      Transparent = True
     258      object ToolButton16: TToolButton
     259        Left = 1
     260        Top = 0
     261        Action = AFilterSameLength
     262        Style = tbsCheck
     263      end
     264      object ToolButton13: TToolButton
     265        Left = 24
     266        Top = 0
     267        Action = AFilterSameLetterCase
     268        Style = tbsCheck
     269      end
    185270    end
    186271  end
  • trunk/Forms/UFormMain.lrt

    r138 r139  
    33TFORMMAIN.LISTVIEWACRONYMS.COLUMNS[1].CAPTION=Meaning
    44TFORMMAIN.LISTVIEWACRONYMS.COLUMNS[2].CAPTION=Categories
    5 TFORMMAIN.TOOLBAR1.CAPTION=ToolBar1
    65TFORMMAIN.AEXIT.CAPTION=Exit
    76TFORMMAIN.ASHOW.CAPTION=Show
  • trunk/Forms/UFormMain.pas

    r138 r139  
    3838    CheckBoxExactLength: TCheckBox;
    3939    CheckBoxCaseSensitive: TCheckBox;
     40    CoolBar1: TCoolBar;
    4041    LastOpenedList1: TLastOpenedList;
    4142    ListViewAcronyms: TListView;
     
    7374    SaveDialog1: TSaveDialog;
    7475    ToolBar1: TToolBar;
     76    ToolBar2: TToolBar;
     77    ToolBar3: TToolBar;
     78    ToolBar4: TToolBar;
    7579    ToolButton1: TToolButton;
    76     ToolButton10: TToolButton;
    7780    ToolButton11: TToolButton;
    7881    ToolButton12: TToolButton;
    7982    ToolButton13: TToolButton;
    80     ToolButton14: TToolButton;
    8183    ToolButton16: TToolButton;
    8284    ToolButton2: TToolButton;
     
    8688    ToolButton6: TToolButton;
    8789    ToolButton7: TToolButton;
    88     ToolButton8: TToolButton;
    8990    ToolButton9: TToolButton;
    9091    procedure AExitExecute(Sender: TObject);
     
    614615  AShowImportSources.Enabled := Assigned(Core.AcronymDb);
    615616  AShowImportFormats.Enabled := Assigned(Core.AcronymDb);
    616   ToolBar1.Visible := MenuItemToolbar.Checked;
     617  CoolBar1.Visible := MenuItemToolbar.Checked;
    617618  PanelParam.Visible := MenuItemParam.Checked;
    618619  AHide.Enabled := FormMain.Visible;
  • trunk/Languages/AcronymDecoder.cs.po

    r138 r139  
    640640msgstr "Nástrojový panel"
    641641
    642 #: tformmain.toolbar1.caption
    643 msgctxt "tformmain.toolbar1.caption"
    644 msgid "ToolBar1"
    645 msgstr "ToolBar1"
    646 
    647642#: tformsettings.buttoncancel.caption
    648643msgctxt "tformsettings.buttoncancel.caption"
     
    898893msgid "Process import sources"
    899894msgstr "Zpracovat zdroje importu"
     895
  • trunk/Languages/AcronymDecoder.po

    r138 r139  
    630630msgstr ""
    631631
    632 #: tformmain.toolbar1.caption
    633 msgctxt "tformmain.toolbar1.caption"
    634 msgid "ToolBar1"
    635 msgstr ""
    636 
    637632#: tformsettings.buttoncancel.caption
    638633msgctxt "tformsettings.buttoncancel.caption"
  • trunk/Packages/Common/UScaleDPI.pas

    r106 r139  
    309309  end;
    310310
     311  if Control is TCoolBar then
     312  with TCoolBar(Control) do begin
     313    BeginUpdate;
     314    for I := 0 to Bands.Count - 1 do
     315      with Bands[I] do begin
     316        MinWidth := ScaleX(MinWidth, FromDPI.X);
     317        MinHeight := ScaleY(MinHeight, FromDPI.Y);
     318        Width := ScaleX(Width, FromDPI.X);
     319        //Control.Invalidate;
     320      end;
     321    EndUpdate;
     322  end;
     323
    311324  if Control is TToolBar then begin
    312325    ToolBarControl := TToolBar(Control);
  • trunk/UCore.pas

    r114 r139  
    189189  // TODO: Transparent image scaling not working properly under linux Gtk2
    190190  // Also screen DPI is not correctly detected under linux Gtk2
     191  //Core.ScaleDPI1.DPI := Point(200, 200);
    191192  {$IFDEF WINDOWS}
     193  Core.ScaleDPI1.ScaleControl(FormMain.CoolBar1, Core.ScaleDPI1.DesignDPI);
    192194  Core.ScaleDPI1.ScaleImageList(ImageList1, Core.ScaleDPI1.DesignDPI);
    193   Core.ScaleDPI1.ScaleControl(FormMain.ToolBar1, Core.ScaleDPI1.DesignDPI);
    194195  {$ENDIF}
    195196end;
Note: See TracChangeset for help on using the changeset viewer.