Re: [scintilla-interest] Re: [Anjuta-list] scrollbars in edit window missing



   Naba,

> I don't have gtk 1.2.9 (ver in my box is 1.2.8) and the scrollbars are
> there very much. I am not very sure if the difference of 0.0.1 in the
> version would bring that much change, but I can always try to find it.

   Upgrading to Gnome 1.4 or a 1.4 pre-release will allow you to see this
problem.

> Unfortunately, I don't have your cvs verion of scintilla.

   Then you can download a zip containing the pre-release code from
http://www.scintilla.org/scite.zip

> Will it be ok if I hack scintilla-134 and send the patch
> (if I am able to find it)?

   You can do what ever you want with the copy of Scintilla you distribute
with Anjuta. Other users patch their copies of Scintilla to fix bugs that
are important to them while waiting for me to make a release.

   I'm not interested in receiving a 1.34 with just this bug fixed. 1.37
will work OK on GTK+1.2.9.

   If you want to patch 1.35 or 1.36 the change is:

void ScintillaGTK::Resize(int width, int height) {
 //Platform::DebugPrintf("Resize %d %d\n", width, height);
 DropGraphics();
 GtkAllocation alloc;

 // Not always needed, but some themes can have different sizes of
scrollbars
 scrollBarWidth = GTK_WIDGET(scrollbarv.GetID())->requisition.width;
 if ((scrollBarWidth == 0)) {
  scrollBarWidth = 16;
  GTK_WIDGET(scrollbarv.GetID())->requisition.width = scrollBarWidth;
 }
 scrollBarHeight = GTK_WIDGET(scrollbarh.GetID())->requisition.height;
 if (horizontalScrollBarVisible && (scrollBarHeight == 0)) {
  scrollBarHeight = 16;
  GTK_WIDGET(scrollbarh.GetID())->requisition.height = scrollBarHeight;
 }

 // These allocations should never produce negative sizes as they would wrap
around to huge
 // unsigned numbers inside GTK+ causing warnings.

 int horizontalScrollBarHeight = scrollBarWidth;
 if (!horizontalScrollBarVisible)
  horizontalScrollBarHeight = 0;

 alloc.x = 0;
 alloc.y = 0;
 alloc.width = Platform::Maximum(1, width - scrollBarWidth) + 1;
 alloc.height = Platform::Maximum(1, height - horizontalScrollBarHeight) +
1;

 alloc.x = 0;
 if (horizontalScrollBarVisible) {
  alloc.y = height - scrollBarHeight + 1;
  alloc.width = Platform::Maximum(1, width - scrollBarWidth) + 1;
  alloc.height = horizontalScrollBarHeight;
 } else {
  alloc.y = height;
  alloc.width = 0;
  alloc.height = 0;
 }
 gtk_widget_size_allocate(GTK_WIDGET(scrollbarh.GetID()), &alloc);

 alloc.x = width - scrollBarWidth + 1;
 alloc.y = 0;
 alloc.width = scrollBarWidth;
 alloc.height = Platform::Maximum(1, height - scrollBarHeight) + 1;
 gtk_widget_size_allocate(GTK_WIDGET(scrollbarv.GetID()), &alloc);

 SetScrollBars();
}

   Neil






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]