View Issue Details

IDProjectCategoryView StatusLast Update
0022851LazarusIDEpublic2013-06-10 23:45
ReporterdaevaAssigned ToPaul Ishenin 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version1.0.0Product Build 
Target Version1.2.0Fixed in Version1.1 (SVN) 
Summary0022851: Hint for component on component palette is not completely visible
DescriptionPlease Look the Screenshot.
TagsNo tags attached.
Fixed in Revisionr41502, r41646
LazTarget1.2
WidgetsetWin32/Win64
Attached Files

Relationships

has duplicate 0022560 resolvedJuha Manninen Hints are truncated 
has duplicate 0021964 resolvedJuha Manninen Hint will lose word 
has duplicate 0020293 resolvedJuha Manninen Tooltips of the components are not wide enough in both directions to show the whole messege. 
has duplicate 0018948 resolvedJuha Manninen Nearly every hint text in the IDE doesn't work properly 
has duplicate 0023684 resolvedJuha Manninen Component hint window is not wide enough to show the whole message on a chinese win 7 
has duplicate 0024487 resolvedJuha Manninen Setting TApplication's Hintcolor truncates hints 
has duplicate 0024520 closedJuha Manninen Lack of IDE tool tips 

Activities

2012-09-10 10:30

 

123.png (581,459 bytes)

Vincent Snijders

2012-09-10 10:46

manager   ~0062261

I updated the summary, and I hope I interpreted the screenshot correctly.

Juha Manninen

2012-09-10 21:10

developer   ~0062280

I checked the other hint related issues and found at least 3 duplicates.
This must be a theme or font settings issue on Windows.
For example, do you have Large Fonts set on Windows?

Juha Manninen

2013-05-31 08:19

developer   ~0067954

Now there are 7 duplicates.

The problem comes very likely with TApplication's Hintcolor, as noted in some duplicate issues.

Bart Broersma

2013-05-31 22:37

developer   ~0067966

Last edited: 2013-05-31 22:40

View 2 revisions

It seems to happen only if you set Application.HintColor before any hint is shown.
If you first show a hint, then change Application.HintColor the bug does not appear.

Before any Hint is shown Application.FHintWindow = nil.
Not sure if this is relevant.

Bart Broersma

2013-05-31 23:33

developer   ~0067968

This seems to be the problem:

procedure THintWindow.UpdateRegion;
var
  ARect: TRect;
  Details: TThemedElementDetails;
  Rgn: HRGN;
begin
  if (Color = clInfoBk) or (Color = clDefault) then
  begin
    Details := ThemeServices.GetElementDetails(tttStandardNormal);
    ARect := ClientRect;
    Rgn := ThemeServices.GetDetailRegion(Canvas.Handle, Details, ARect);
    SetWindowRgn(Handle, Rgn, False);
  end;
end;

If I comment out the "if (Color = clInfoBk) or (Color = clDefault) then" so SetWindowRegion is called always, then the hint window seems OK.

I'm unsure if this is the right fix though.

Bart Broersma

2013-05-31 23:41

developer   ~0067969

Note: in Paint, ARect has the same (correct) dimensions wether or not the bug is present.

Juha Manninen

2013-06-01 09:22

developer   ~0067976

Bart, to me it looks like a correct fix. Why should the code do its thing only for clInfoBk and clDefault colored hints? The bug is there, go ahead fixing it.

Bart Broersma

2013-06-01 15:10

developer   ~0067985

@JuHa: I have no idea what that whole part about regions is.
I rather don't mess with things I don't understand, so i leave it to someone who does.

Juha Manninen

2013-06-01 17:34

developer   ~0067987

Bart, it apparently is the client area or rectangle where the hint is shown.
UpdateRegion is called from overridden SetBounds. Your fix will be correct in 99.8% certainty. Why would only a hint with certain color get a client area calculation?
I could commit it but then I feel like stealing your code.

Trust your instinct. May the source be with you! :)

Bart Broersma

2013-06-01 21:33

developer   ~0067988

> Bart, it apparently is the client area or rectangle where the hint is shown.
Not sure. Earlier in the code you can find something like ARext := ClientRect.
I don't see why a paint should "fail" if SetWindowRgn isn't called before?

I tried to look for other examples but failed.

Paul Ishenin

2013-06-03 04:24

manager   ~0068006

I removed region crop when color is not default in r41502. This at least fixes 0024487.

Bart Broersma

2013-06-04 23:29

developer  

hintcolor.zip (2,300 bytes)

Bart Broersma

2013-06-04 23:33

developer   ~0068066

Sample proect attached.
Build and run.
Hoover the button that says "See My Hint"
Click "Change Hint Color"
Hoover "See My Hint" --> All is well, no truncation, yellow background.

Quit application
Re-start application
Do NOT hoover "See My Hint"
Click "Change Hint Color"
Hoover "See My Hint" --> Hint is now truncated.

Paul Ishenin

2013-06-07 03:27

manager   ~0068106

Bart, as I wrote in previous note I fixed that problem in r41502. I don't think that wrong region after hint color change is related to wrong region for component hints.

Bart Broersma

2013-06-07 15:07

developer   ~0068114

@Paul: missed that. Sorry for the pollution.
Sample project now is fixed.

Paul Ishenin

2013-06-10 07:58

manager   ~0068170

Please test and close if ok.

Issue History

Date Modified Username Field Change
2012-09-10 10:30 daeva New Issue
2012-09-10 10:30 daeva File Added: 123.png
2012-09-10 10:30 daeva Widgetset => Win32/Win64
2012-09-10 10:46 Vincent Snijders LazTarget => -
2012-09-10 10:46 Vincent Snijders Summary Hello Sir! Please check out this problem! => Hint for component on component palette is not completely visible
2012-09-10 10:46 Vincent Snijders Description Updated
2012-09-10 10:46 Vincent Snijders Note Added: 0062261
2012-09-10 20:54 Juha Manninen Relationship added related to 0022560
2012-09-10 20:59 Juha Manninen Relationship added duplicate of 0021964
2012-09-10 21:02 Juha Manninen Relationship added duplicate of 0020293
2012-09-10 21:06 Juha Manninen Relationship added duplicate of 0018948
2012-09-10 21:10 Juha Manninen Note Added: 0062280
2013-01-19 21:24 Juha Manninen Relationship added related to 0023684
2013-05-26 20:24 Martin Friebe Relationship added related to 0024487
2013-05-31 08:02 Juha Manninen Relationship replaced has duplicate 0018948
2013-05-31 08:04 Juha Manninen Relationship replaced has duplicate 0021964
2013-05-31 08:06 Juha Manninen Relationship replaced has duplicate 0020293
2013-05-31 08:08 Juha Manninen Relationship replaced has duplicate 0022560
2013-05-31 08:09 Juha Manninen Relationship replaced has duplicate 0023684
2013-05-31 08:12 Juha Manninen Relationship replaced has duplicate 0024487
2013-05-31 08:15 Juha Manninen Relationship added has duplicate 0024520
2013-05-31 08:19 Juha Manninen Note Added: 0067954
2013-05-31 22:37 Bart Broersma Note Added: 0067966
2013-05-31 22:40 Bart Broersma Note Edited: 0067966 View Revisions
2013-05-31 23:33 Bart Broersma Note Added: 0067968
2013-05-31 23:41 Bart Broersma Note Added: 0067969
2013-06-01 09:22 Juha Manninen Note Added: 0067976
2013-06-01 15:10 Bart Broersma Note Added: 0067985
2013-06-01 17:34 Juha Manninen Note Added: 0067987
2013-06-01 21:33 Bart Broersma Note Added: 0067988
2013-06-03 04:24 Paul Ishenin Note Added: 0068006
2013-06-04 23:29 Bart Broersma File Added: hintcolor.zip
2013-06-04 23:33 Bart Broersma Note Added: 0068066
2013-06-04 23:34 Bart Broersma Assigned To => Paul Ishenin
2013-06-04 23:34 Bart Broersma Status new => assigned
2013-06-07 03:26 Paul Ishenin Fixed in Revision => r41502
2013-06-07 03:27 Paul Ishenin Note Added: 0068106
2013-06-07 15:07 Bart Broersma Note Added: 0068114
2013-06-10 07:58 Paul Ishenin Fixed in Revision r41502 => r41502, r41646
2013-06-10 07:58 Paul Ishenin LazTarget - => 1.2
2013-06-10 07:58 Paul Ishenin Note Added: 0068170
2013-06-10 07:58 Paul Ishenin Status assigned => resolved
2013-06-10 07:58 Paul Ishenin Fixed in Version => 1.1 (SVN)
2013-06-10 07:58 Paul Ishenin Resolution open => fixed
2013-06-10 07:58 Paul Ishenin Target Version => 1.2.0