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

minor nuisance about background image rendering, and some ideas #1372

Closed
nerditation opened this Issue Dec 25, 2017 · 2 comments

Comments

Projects
2 participants
@nerditation

nerditation commented Dec 25, 2017

Versions

ConEmu build: 171217 alpha x64
OS version: Windows 10 x64
Used shell version : cmd, msys2 fish (irrelevant)

Problem description

a background image will not fill the entire window area, but only the text area, when the window size is not integral multiple of the font size. normally when the window is resized, the font size is checked and respected, but in some case it can happen that the text area is not the same as the window's client area, as described below

although it is not really a functional bug, it might be a little bit annoying for OCD users like me.

this issue is related with font sizes and can be most obviously seen using large font sizes.

Steps to reproduce

there are at least 2 methods to demostrate this:

  1. change font size without resizing the ConEmu window. for certain values of font size, gap will appear at the right and bottom border of the text area, see screenshot 1. resizing the window (or minimize then restore it) will fix the issue

  2. set the font size to some value not dividable by the screen size, then maximize the ConEmu window. in this case, conemu will put the text area in the center, so gap will be on all 4 sides. see screenshot 2.

I discovered this because my laptop screen is 1366 pixel wide, and I want to set the font size to 16, then I notice the gap.

I searched the issue tracker, finding #348 and #1231 should be related but not exactly the same.

after hours of digging into the code, I found the function void CVirtualConsole::PaintBackgroundImage() at here might be interesting: it uses the text rect to calculate the dimensions of the background image.

imo it'd be better to use the window size instead of the text rect. this way, we can also draw the background image under the status bar area, preferablly with smaller alpha value to blend with the color pallete.

unfortunately, I am not able to understand the whole codebase and don't have visual studio installed to test it out myself.

btw, I'd like to also suggest to draw a single background image for splitted panes. currently, it looks like screenshot 3, which looks, in my option, not very good. but this might need to change the way how the background coordiates are calculated.

again, I can't test it myself. sorry about that.

screenshots

screenshot 1 - change font without resizing window
screenshot1

screenshot2 - font size incompatible with fullscreen resolution
screenshot2

screenshot3 - splitted panes with background image
screenshot3

Maximus5 added a commit that referenced this issue Dec 26, 2017

gh-348, gh-1231, gh-1372: Let background image cover VCon pad areas too.
  When ‘Pad size’ is greater than zero or ‘Align ConEmu window size to cells’ is
  not checked or Splits exist the gaps may appears around VCon.

@Maximus5 Maximus5 added this to In progress in ConEmu Dec 27, 2017

@Maximus5 Maximus5 moved this from In progress to Ready for Testing in ConEmu Dec 27, 2017

@Maximus5 Maximus5 added the drawing label Dec 27, 2017

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@nerditation

This comment has been minimized.

Show comment
Hide comment
@nerditation

nerditation Jan 12, 2018

the issue of missing background image on the border around the textarea is fixed in release 171226.
this issue can be closed for now.

still looking forward to the feature of drawing background on statusbar, and drawing a single background image for split panes.

nerditation commented Jan 12, 2018

the issue of missing background image on the border around the textarea is fixed in release 171226.
this issue can be closed for now.

still looking forward to the feature of drawing background on statusbar, and drawing a single background image for split panes.

ConEmu automation moved this from Ready for Testing to Done Jan 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment