ProgerXP / Notepad2e

Word highlighting, simultaneous editing, split views, math evaluation, un/grep, comment reformatting, UAC elevation, complete regexps (PCRE), Lua lexers, DPI awareness and more (XP+)
Other
375 stars 52 forks source link

Resize statusbar groups #304

Closed ProgerXP closed 4 years ago

ProgerXP commented 4 years ago

Change width of the last group (current scheme) by -65 pixels and add this number of pixels to the first group (Ln ...). Keep width of other groups unchanged.

cshnik commented 4 years ago

Status bar groups has dynamic size depending the current window size (and content) and are measured in client coordinates. Group 1 had the following limits:

  1. min width: 120 points
  2. max width: 1/3 window width

I had increased min width limit to 200 points. Please confirm if it fix the issue.

ProgerXP commented 4 years ago

I see absolutely no difference after the change no matter how long the window is. Width is still the same as in Notepad2.

The point is that we have added much more info to the first group (after "Ln Col Sel") so it doesn't fit entirely unless you expand the window too much.

statusbar

cshnik commented 4 years ago

Fixed. I have slightly changed the logic for DocPos pane size calculation. Now it has the greater value from:

  1. 1/3 width of the status bar
  2. The actual DocPos text width

Note: status bar panes size get updated on window resize.

ProgerXP commented 4 years ago

The actual DocPos text width

Problem is that the text may change. Moreover, it's likely to be different on start-up because the position is at the very beginning and hence the text is shorter by 4-5 digits than it can become (Pos 0 = Pos 12 345). I guess for this reason there was a hardcoded long string.

1

cshnik commented 4 years ago

The actual DocPos text width

Problem is that the text may change. Moreover, it's likely to be different on start-up because the position is at the very beginning and hence the text is shorter by 4-5 digits than it can become (Pos 0 = Pos 12 345). I guess for this reason there was a hardcoded long string.

1

Fixed. Status pane width is updated on-the-fly on text change.