Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

offset tooltip for bookmarks #5005

Closed
veksha opened this issue Apr 19, 2023 · 13 comments
Closed

offset tooltip for bookmarks #5005

veksha opened this issue Apr 19, 2023 · 13 comments

Comments

@veksha
Copy link
Contributor

veksha commented Apr 19, 2023

can we offset tooltip a little? mouse cursor is covering the text.

image

@Alexey-T
Copy link
Owner

atsynedit_globals.pas

    HintBookmarkDx:= 6;
    HintBookmarkDy:= 16;

Change 6 to 16. ok for you?

@Alexey-T Alexey-T changed the title offset tooltip offset tooltip for bookmarks Apr 19, 2023
@Alexey-T
Copy link
Owner

Both values >16 are not good- normal mouse cusror is 16x16, yes?

@veksha
Copy link
Contributor Author

veksha commented Apr 19, 2023

i see two ways.

  1. change it to:
    HintBookmarkDx:= 6;
    HintBookmarkDy:= -16;

or

  1. try to read CursorBaseSize from registry key HKEY_CURRENT_USER\Control Panel\Cursors
    HintBookmarkDx:= 6 + (GetCursorBaseSize div 4);
    HintBookmarkDy:= 16;

Alexey-T added a commit to Alexey-T/ATSynEdit that referenced this issue Apr 19, 2023
@Alexey-T
Copy link
Owner

used the way-1. made the fix.

@veksha
Copy link
Contributor Author

veksha commented Apr 19, 2023

also maybe increase its font size according to ui_scale_font option?

@Alexey-T
Copy link
Owner

App don't render the hint, it's lazarus doing it.
I don't know how to change the font.

lazarus/lcl/include/hintwindow.inc

@Alexey-T
Copy link
Owner

ah,

  Font := Screen.HintFont;

so I can change it.

@Alexey-T
Copy link
Owner

formmain_loadsave.inc

below the line

 N:= cfg.GetValue('ui_scale_font'+cOptionSystemSuffix, -1);

added:

  N:= cfg.GetValue('ui_scale_font'+cOptionSystemSuffix, -1);
  if (N>=0) and (N<=cMaxScale) then
  begin
    ATEditorScaleFontPercents:= N;
    Screen.HintFont.Size:= ATEditorScaleFont(9);
  end; 

this gives zoomed hint-font but only after app restart....

@veksha
Copy link
Contributor Author

veksha commented Apr 19, 2023

working good, thanks

Alexey-T added a commit to Alexey-T/ATSynEdit that referenced this issue Apr 19, 2023
@Alexey-T
Copy link
Owner

I changed mentioned 2 int constants to 16, 16. to not overlap icon's line with icon's tooltip!

@veksha
Copy link
Contributor Author

veksha commented Apr 19, 2023

works fine for me:
image

@veksha veksha closed this as completed Apr 19, 2023
@Alexey-T
Copy link
Owner

I changed setting of Screen.HintFont (apply the size always). ok in windows?

@veksha
Copy link
Contributor Author

veksha commented Apr 19, 2023

yes.

z4ziggy added a commit to z4ziggy/CudaText that referenced this issue Apr 19, 2023
  > better apply Screen.HintFont for hints
  > for Alexey-T#5005
  > for Alexey-T#5005
  > cmt
  > fix bug in wrapinfo calculation with unicode text, Alexey-T#4996
  > refac
  > rename vars
  > add typecast to Int64
  > fix in UpdateScrollbars, set horz pos to 0 if word-wrap on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants