Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » [Minor bug & patch] ArrayCtrl and HeaderCtrl should use native resizing icons on X11.
[Minor bug & patch] ArrayCtrl and HeaderCtrl should use native resizing icons on X11. [message #39538] |
Tue, 26 March 2013 17:29 |
|
Klugier
Messages: 1076 Registered: September 2012 Location: Poland, Kraków
|
Senior Contributor |
|
|
Hello,
It is very similar topic as my previous one (GridCtrl should use native resizing icons). In this case we have problem with ArrayCtrl and HeaderCtrl.
First of all, we need to modify CtrlLib/HeaderCtrl.cpp (line 515):
Image HeaderCtrl::CursorImage(Point p, dword) {
#ifdef PLATFORM_X11
Image horzPosImg = Image::SizeHorz();
#else
Image horzPosImg = CtrlsImg::HorzPos();
#endif
if(mode == FIXED)
return Image::Arrow();
if(HasCapture())
return split >= 0 ? horzPosImg : Image::Arrow();
int q = GetSplit(p.x);
return q < 0 ? Image::Arrow()
: GetTabWidth(q) < 4 ? CtrlsImg::HorzSplit()
: horzPosImg;
}
Next, let's modify CtrlLib/ArrayCtrl (line 1643):
Image ArrayCtrl::CursorImage(Point p, dword)
{
#ifdef PLATFORM_X11
Image horzPosImg = Image::SizeHorz();
#else
Image horzPosImg = CtrlsImg::HorzPos();
#endif
if(!IsNull(cursor_override))
return cursor_override;
return header.GetSplit(p.x) < 0 || header.GetMode() == HeaderCtrl::FIXED ? Image::Arrow()
: horzPosImg;
}
Added 04.04.2013:
I have rewritten this patch to make it more multiplatform. Now, ArrayCtrl should work great on all X11 operating system.
Sincerely,
Klugier
U++ - one framework to rule them all.
[Updated on: Thu, 04 April 2013 16:53] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Mon May 13 19:33:38 CEST 2024
Total time taken to generate the page: 0.01828 seconds
|