Recent

Author Topic: tbsCheck ToolButton  (Read 12327 times)

anna

  • Sr. Member
  • ****
  • Posts: 426
tbsCheck ToolButton
« on: July 15, 2010, 12:45:24 pm »
Lazarus Daily Snapshot: Lazarus-0.9.29-26562-fpc-2.4.0-20100710-win32.exe
OS: WinXP SP3

ToolButton's Style property must be tbsCheck.
ToolButton must have some image from some ImageList.
Paternal ToolBar's Flat property must be True.

Problem:
When I push left mouse button on Toolbutton , its image goes little right & down. When I release left mouse button, Toolbutton becomes downed but Toolbutton's image restores position. But if Toolbutton is in downed mode its image must be little right & down.

Cursor over ToolButton: http://img197.imageshack.us/img197/4206/29139781.png
Cursor over ToolButton and left mouse button is pressed: http://img189.imageshack.us/img189/6066/83945603.png
Left mouse button is released: http://img339.imageshack.us/img339/7584/53308528.png

So why is ToolButton's image on screensot3 not in same position as on screensot2?
« Last Edit: July 15, 2010, 01:01:55 pm by anna »
WinXP SP3 Pro Russian 32-bit (5.1.2600)

anna

  • Sr. Member
  • ****
  • Posts: 426
Re: tbsCheck ToolButton
« Reply #1 on: July 15, 2010, 03:45:37 pm »

Downed SpeedButton with nonzero GroupIndex has correct moving of Gliph.
Why do not ToolButton behaviour duplicate nonzero-GroupIndex-SpeedButton behaviour?
Is it a bug?
WinXP SP3 Pro Russian 32-bit (5.1.2600)

anna

  • Sr. Member
  • ****
  • Posts: 426
Re: tbsCheck ToolButton
« Reply #2 on: July 19, 2010, 03:32:46 pm »
In what unit is there code which drives Gliph movements?
« Last Edit: July 19, 2010, 03:45:59 pm by anna »
WinXP SP3 Pro Russian 32-bit (5.1.2600)

anna

  • Sr. Member
  • ****
  • Posts: 426
Re: tbsCheck ToolButton
« Reply #3 on: July 19, 2010, 08:27:01 pm »
I cannot find unit.
Moderator, you said that Lazarus is opensource. Why are you silent? I'll repeat the question:
In what unit is there code which drives Gliph movements?

You also cannot find unit, can you?

:(
 :'(
« Last Edit: July 19, 2010, 08:31:35 pm by anna »
WinXP SP3 Pro Russian 32-bit (5.1.2600)

anna

  • Sr. Member
  • ****
  • Posts: 426
Re: tbsCheck ToolButton
« Reply #4 on: July 19, 2010, 08:33:59 pm »
I see/
Lazarus is not open source!!!
WinXP SP3 Pro Russian 32-bit (5.1.2600)

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: tbsCheck ToolButton
« Reply #5 on: July 19, 2010, 09:15:55 pm »
Moderator, you said that Lazarus is opensource. Why are you silent? I'll repeat the question:
In what unit is there code which drives Gliph movements?

You also cannot find unit, can you?
Actually, It's something similar to a hospital. The most critical bugs are get most attention of the developers. Of course, the difference is that "doctors" here are not payed for curing "patients", so sometimes "doctors" spend their time on what they actually interested in.

Anyway, I'm looking at your problem right now.

anna

  • Sr. Member
  • ****
  • Posts: 426
Re: tbsCheck ToolButton
« Reply #6 on: July 19, 2010, 09:27:57 pm »
Moderator, you said that Lazarus is opensource. Why are you silent? I'll repeat the question:
In what unit is there code which drives Gliph movements?

You also cannot find unit, can you?
Actually, It's something similar to a hospital. The most critical bugs are get most attention of the developers. Of course, the difference is that "doctors" here are not payed for curing "patients", so sometimes "doctors" spend their time on what they actually interested in.

Anyway, I'm looking at your problem right now.
:D

Just tell unit name.
WinXP SP3 Pro Russian 32-bit (5.1.2600)

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: tbsCheck ToolButton
« Reply #7 on: July 19, 2010, 09:34:07 pm »
:D

Just tell unit name.

the unit name is ComCtrls. But you're interested in toolbutton.inc file.
The method TToolButton.Paint

line 346 (latest SVN)
Code: [Select]
   if (ImgList<>nil) then
    begin
      if ThemeServices.IsPushed(Details) then
      begin
        inc(IconPos.X);
        inc(IconPos.Y);
      end;
      
      ImgList.Draw(Canvas, IconPos.X, IconPos.Y, ImgIndex, Enabled);
    end;  

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: tbsCheck ToolButton
« Reply #8 on: July 19, 2010, 09:44:27 pm »
you can try fixing the problem by using this check
Code: [Select]
if ThemeServices.IsPushed(Details) or Down then
   ...

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: tbsCheck ToolButton
« Reply #9 on: July 19, 2010, 10:04:42 pm »
fixed r26740. please test and close the issue if it's fine

anna

  • Sr. Member
  • ****
  • Posts: 426
Re: tbsCheck ToolButton
« Reply #10 on: July 20, 2010, 02:35:27 am »
you can try fixing the problem by using this check
Code: [Select]
if ThemeServices.IsPushed(Details) or Down then
   ...
I have written this, but nothing's happened. After releasing left mouse button, Gliph still restores original position.
What the stupid?

I even tried to rebuild Lazarus, but unsuccessfully. So toolbutton.inc file unrelated to Lazarus. What purpose is toolbutton.inc for?


How to modify Lazarus, eh?

Where is r26740? I can see r26728 only! While r26740 is relegated to oblivion, tell me how get into shape current Lazarus.
« Last Edit: July 20, 2010, 02:46:07 am by anna »
WinXP SP3 Pro Russian 32-bit (5.1.2600)

Troodon

  • Sr. Member
  • ****
  • Posts: 484
Re: tbsCheck ToolButton
« Reply #11 on: July 20, 2010, 03:56:46 am »
Missie, the guy is trying to be helpful. How often does a bug get fixed so fast? Check this out: http://svn.freepascal.org/svn/lazarus/
Lazarus/FPC on Linux

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: tbsCheck ToolButton
« Reply #12 on: July 20, 2010, 05:38:44 am »
I have written this, but nothing's happened. After releasing left mouse button, Gliph still restores original position.
What the stupid?
Did you rebuild LCL?
You've modified the LCL unit. To see changes in action you need to rebuild LCL and then rebuild the application.
Select from menu Tools -> Configure "Build Lazarus" -> Quick Build Options. select "Build LCL" at "Build options" and then press "Build" bottom.

I even tried to rebuild Lazarus, but unsuccessfully. So toolbutton.inc file unrelated to Lazarus. What purpose is toolbutton.inc for?
Why was it unsuccessfully? It feels like you've rebuilt Lazarus IDE only, without rebuilding LCL first.
As for the purpose of toolbutton.inc, I'm sure you can find the answer just by looking at ComCtrls unit.

Where is r26740? I can see r26728 only!
I guess you're looking at Daily Snapshots.
26740 is already available where: http://www.hu.freepascal.org/lazarus/
Though not for win64, of some reason.

« Last Edit: July 20, 2010, 05:45:45 am by skalogryz »

anna

  • Sr. Member
  • ****
  • Posts: 426
Re: tbsCheck ToolButton
« Reply #13 on: July 20, 2010, 07:32:50 am »
Moderator, I love you.
WinXP SP3 Pro Russian 32-bit (5.1.2600)

 

TinyPortal © 2005-2018