~ubuntu-branches/ubuntu/vivid/lazarus/vivid

« back to all changes in this revision

Viewing changes to lcl/include/toolbutton.inc

  • Committer: Package Import Robot
  • Author(s): Paul Gevers, Abou Al Montacir, Paul Gevers
  • Date: 2014-02-22 10:25:57 UTC
  • mfrom: (1.1.11)
  • Revision ID: package-import@ubuntu.com-20140222102557-ors9d31r84nz31jq
Tags: 1.2~rc2+dfsg-1
[ Abou Al Montacir ]
* New upstream pre-release.
  + Moved ideintf to components directory.
  + Added new package cairocanvas.
* Remove usage of depreciated parameters form of find. (Closes: Bug#724776)
* Bumped standard version to 3.9.5.
* Clean the way handling make files generation and removal.

[ Paul Gevers ]
* Remove nearly obsolete bzip compression for binary packages
  (See https://lists.debian.org/debian-devel/2014/01/msg00542.html)
* Update d/copyright for newly added dir in examples and components
* Update Vcs-* fields with new packaging location
* Update d/watch file to properly (Debian way) change upstreams versions
* Prevent 46MB of package size by sym linking duplicate files
* Patches
  - refresh to remove fuzz
  - add more Lintian found spelling errors
  - new patch to add shbang to two scripts in lazarus-src
* Drop lcl-# from Provides list of lcl-units-#
* Make lazarus-ide-qt4-# an arch all until it really contains stuff
* Make all metapackages arch all as the usecase for arch any doesn't
  seem to warrant the addition archive hit
* Fix permissions of non-scripts in lazarus-src-#

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
{ TToolButton
4
4
 
5
5
 *****************************************************************************
6
 
 *                                                                           *
7
 
 *  This file is part of the Lazarus Component Library (LCL)                 *
8
 
 *                                                                           *
9
 
 *  See the file COPYING.modifiedLGPL.txt, included in this distribution,    *
10
 
 *  for details about the copyright.                                         *
11
 
 *                                                                           *
12
 
 *  This program is distributed in the hope that it will be useful,          *
13
 
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of           *
14
 
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                     *
15
 
 *                                                                           *
 
6
  This file is part of the Lazarus Component Library (LCL)
 
7
 
 
8
  See the file COPYING.modifiedLGPL.txt, included in this distribution,
 
9
  for details about the license.
16
10
 *****************************************************************************
17
11
 
18
12
}
204
198
    begin
205
199
      if FToolBar.IsVertical then
206
200
      begin
207
 
        if (ARect.Bottom - ARect.Top) > 10 then
 
201
        if (ARect.Bottom - ARect.Top) >= 10 then
208
202
        begin
209
203
          ARect.Top := (ARect.Top + ARect.Bottom) div 2 - 5;
210
204
          ARect.Bottom := ARect.Top + 5;
217
211
      end
218
212
      else
219
213
      begin
220
 
        if (ARect.Right - ARect.Left) > 10 then
 
214
        if (ARect.Right - ARect.Left) >= 10 then
221
215
        begin
222
216
          ARect.Left := (ARect.Left + ARect.Right) div 2 - 5;
223
217
          ARect.Right := ARect.Left + 5;
316
310
    // draw button
317
311
    if (Style in [tbsButton, tbsDropDown, tbsCheck]) then
318
312
    begin
319
 
      // if toolbar is not flat then normal and disabled state is drawn as hot
 
313
      // non-Flat toolbars come from old windows where you was able to set how
 
314
      // to draw it by adjusting toolbar window options
 
315
      // with current windows toolbars should be drawn using Theme
 
316
      // so let's treat flat toolbars as starndard toolbars and draw them using ThemeManager
 
317
      // and to draw a non-Flat toolbars we need to somehow mimic always raised state
 
318
      // of their buttons - a good way is to draw them using Hot style also for
 
319
      // normal and disables states
320
320
      TempDetails := Details;
321
321
      if ((FToolBar <> nil) and not FToolBar.Flat) and (TempDetails.State in [1, 4]) then
322
322
        TempDetails.State := 2;
580
580
  if FImageIndex = Value then exit;
581
581
  FImageIndex := Value;
582
582
  if IsControlVisible and Assigned(FToolBar) then
583
 
  begin
584
 
    RefreshControl;
585
583
    Invalidate;
586
 
  end;
587
584
end;
588
585
 
589
586
procedure TToolButton.SetMarked(Value: Boolean);