Recent

Author Topic: Aesthetic bugfix of Lazarus's Component Palette  (Read 42486 times)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9857
  • Debugger - SynEdit - and more
    • wiki
Re: Aesthetic bugfix of Lazarus's Component Palette
« Reply #60 on: April 30, 2014, 11:38:06 am »
Code: [Select]
LCLIntf.GetSystemMetrics(SM_CXVSCROLL);
That is window only? Not sure, not checked, no need to check, as there is  Scrollbar.SIze, that returns the width but that is what is used by already vie ClientWidthWithBar.

x2nie

  • Hero Member
  • *****
  • Posts: 515
  • Impossible=I don't know the way
    • impossible is nothing - www.x2nie.com
Re: Aesthetic bugfix of Lazarus's Component Palette
« Reply #61 on: April 30, 2014, 12:13:41 pm »

Can you set the arrow button on the right to bottom aligned ..
Oops, bottom aligned?
IMHO center aligned is better.
...
 I still think that bottom is better although I don't like it there at all.


Nice, there is a win-win solution:
* Chevron button should bottom aligned when in multi-row mode. I agree it is better to see in in bottom, it is easier to find it in bottom.
* Chevron button should centered vertically while in single-row mode.


Luckily, we can set it "dinamically": whether to top/bottom alignment according to single/multiple row mode.


Oops, Wait...,
I were liying you. My solution will lies any user's eyes too.
Actually it is always in bottom aligned, but when in single mode, the space between icon to button boundary (top and bottom) are distributed equally.
Meaning the vertical-centered-alignment is only done in our eyes.
The button seem centered vertically. The button it self is still bottom aligned.
see the picture below.


---------
Anyway, if you didn't like to see (the mockup), is because it was too far in bottom IMO.
My correction is to increase the button Width, this way, will move the icon up a bit.
so it seem in the "middle of bottom".


In this case, margin is mater.
But, wait... there is no such margin we used in chevron button case.
So, the margin is measured between the button's Glyph to it's button bounds.


--------


Below is updated patch with ingredients:
* Dynamic alignment of chevron I described above
* Bugfix hidden arrow button when IDE resized and Scrollbox has scrollbar visible.
* Component buttons in the center vertically
Appliying it requires trunk #44848
When you were logged in, you can see attachments.
Lazarus Github @ UbuntuCinnamon-v22.04.1 + LinuxMintDebianEdition5

x2nie

  • Hero Member
  • *****
  • Posts: 515
  • Impossible=I don't know the way
    • impossible is nothing - www.x2nie.com
Re: Aesthetic bugfix of Lazarus's Component Palette
« Reply #62 on: April 30, 2014, 12:20:30 pm »
Code: [Select]
LCLIntf.GetSystemMetrics(SM_CXVSCROLL);
That is window only? Not sure, not checked, no need to check, as there is  Scrollbar.SIze, that returns the width but that is what is used by already vie ClientWidthWithBar.


Okay, I am not sure too whether it was cross-widgetset implemented.
As reference, it is used in Lazarus program, main.pas line:1534


Code: [Select]
AMenuHeight := LCLIntf.GetSystemMetrics(SM_CYMENU);
  if AMenuHeight > 0 then
  begin
    // what we know:
    // 1. cmd speedbuttons height = 22
    // 2. components palette buttons = 32
    // 3. menu height provided by widgetset (varies , depends on theme)
    // so we set 22 + 32 + (borders * 2).
    MainIDEBar.Constraints.MaxHeight := AMenuHeight +
      22 {cmd speedbtns} + 32 {component buttons} * 3 {multirow} +
      LCLIntf.GetSystemMetrics(SM_CYSIZEFRAME) +
      (LCLIntf.GetSystemMetrics(SM_CYBORDER) * 2) {borders};
  end else
    MainIDEBar.Constraints.MaxHeight:=85;   


The red text is my own modification to make Lazarus able to show multiple-row of COmponentPalette buttons.
When you were logged in, you can see attachments.
Lazarus Github @ UbuntuCinnamon-v22.04.1 + LinuxMintDebianEdition5

x2nie

  • Hero Member
  • *****
  • Posts: 515
  • Impossible=I don't know the way
    • impossible is nothing - www.x2nie.com
Re: Aesthetic bugfix of Lazarus's Component Palette
« Reply #63 on: April 30, 2014, 12:23:23 pm »
Well It seem I failed to make text color as red inside the "CODE" block.


I refer to this text:
* 3 {multirow}
When you were logged in, you can see attachments.
Lazarus Github @ UbuntuCinnamon-v22.04.1 + LinuxMintDebianEdition5

x2nie

  • Hero Member
  • *****
  • Posts: 515
  • Impossible=I don't know the way
    • impossible is nothing - www.x2nie.com
Re: Aesthetic bugfix of Lazarus's Component Palette
« Reply #64 on: April 30, 2014, 12:46:58 pm »
Martin, below patch is for you.
I've clean up another proposal solution.


I hope you like it  :D


Regards,
x2nie
When you were logged in, you can see attachments.
Lazarus Github @ UbuntuCinnamon-v22.04.1 + LinuxMintDebianEdition5

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9857
  • Debugger - SynEdit - and more
    • wiki
Re: Aesthetic bugfix of Lazarus's Component Palette
« Reply #65 on: April 30, 2014, 01:00:47 pm »
Ok, this thread is now so long, that it becomes hard to keep track of any of the patches you submitted.
Also I do not know if any other developers who might help with it are aware of this (afaik not all developers are on the forum).

If you consider any of the not yet applied patches to be ready, then you should submit them on our bug tracker.

x2nie

  • Hero Member
  • *****
  • Posts: 515
  • Impossible=I don't know the way
    • impossible is nothing - www.x2nie.com
Re: Aesthetic bugfix of Lazarus's Component Palette
« Reply #66 on: April 30, 2014, 01:13:33 pm »
Agree, it was too long as from expected. Perhaps we need to close this topic soon. Then move it on Bugtracker or Mailist. Yesterday I've subscribe in both mailist + bugtrack.
I think I am ready now to go there.
However I am happy discussing in forum way, however. Due my irritation is not because it is a bug, this discussion was in cosmetic level.


I love to say it were suggestions, not a bug found. Therefor there is nothing such bugfix in fact.
My apologize for a provoke title.
[size=78%] [/size]


Long live Lazarus !!!






Thanks you very much.
When you were logged in, you can see attachments.
Lazarus Github @ UbuntuCinnamon-v22.04.1 + LinuxMintDebianEdition5

x2nie

  • Hero Member
  • *****
  • Posts: 515
  • Impossible=I don't know the way
    • impossible is nothing - www.x2nie.com
Re: Aesthetic bugfix of Lazarus's Component Palette
« Reply #67 on: April 30, 2014, 02:04:44 pm »
When you were logged in, you can see attachments.
Lazarus Github @ UbuntuCinnamon-v22.04.1 + LinuxMintDebianEdition5

 

TinyPortal © 2005-2018