mikklsn2 / metalscroll

Automatically exported from code.google.com/p/metalscroll
Apache License 2.0
0 stars 0 forks source link

Painting is broken in empty space next to split widget #2

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The window split widget itself is fine, but the empty space between its
left edge and the left edge of the metalscroll bar is not being cleared.
Sometimes it is painted with another part of the metalscroll bar, sometimes
it is just empty. When painted with another part of the bar, it looks like
there is more code up there beyond the actual top of the bar, which is
confusing.

It is not repainted when changing tabs as long as the size of the
metalscroll bar remains the same and the bar stays visible. If the active
pane does not have the metalscroll bar, or for example lacks the member
name toolbar causing the metalscroll bar to grow vertically, the space is
repainted once with something that just happened to be in the buffer.

Expected behavior would be to have this space painted with the metalscroll
background color at all times.

This is in VS 2008 SP1 on Win7 x64 with Metalscroll 1.0.7.

Original issue reported on code.google.com by sieg...@gmail.com on 15 Dec 2009 at 9:59

GoogleCodeExporter commented 8 years ago
Yes, this is mentioned under known issues. The thing is, I'd have to subclass 
the
editor container window to handle painting in there, and it's a bit tedious (the
splitter widget itself doesn't have a HWND). I'll give it a shot when I have 
some
free time.

Original comment by mihnea.balta@gmail.com on 17 Dec 2009 at 5:02

GoogleCodeExporter commented 8 years ago
How about a preference to hide the split widget entirely? Maybe that would not
require subclassing the container. Personally I never knew it was there until I 
saw
it mentioned in the feature list for MetalScroll, so I would happily give it up 
in
exchange for less confusion in the minimap.

Original comment by sieg...@gmail.com on 17 Dec 2009 at 8:05

GoogleCodeExporter commented 8 years ago
That's much easier. If I find it too time consuming to do the subclassing, I'll 
add
that option as a workaround until I find time to do the right thing. Thanks for 
the
suggestion.

Original comment by mihnea.balta@gmail.com on 17 Dec 2009 at 8:35

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I found a way to hide the splitter.
In file MetalBar.cpp, at the end of method:
    void MetalBar::AdjustSize(unsigned int requiredWidth)
adding new line
    vertBarPlacement.rcNormalPosition.top = -7;  // new
after (line no 161)
    vertBarPlacement.rcNormalPosition.left -= diff;
adds extra size at top of the scroller window so the splitter is no more 
visible.
Looks like 7 is the height of the splitter.

Original comment by crystal...@gmail.com on 25 Jan 2010 at 6:29