]> git.ipfire.org Git - thirdparty/newt.git/commitdiff
- fix scrollbar positioning in listbox
authormlichvar <mlichvar>
Fri, 8 Jun 2007 10:59:14 +0000 (10:59 +0000)
committermlichvar <mlichvar>
Fri, 8 Jun 2007 10:59:14 +0000 (10:59 +0000)
listbox.c
newt.spec

index d0ac5d333c1a8cdbb49050678f942ceef3994720..c802e7ce0f9616af8aa516033c16495b1208fdee 100644 (file)
--- a/listbox.c
+++ b/listbox.c
@@ -74,7 +74,7 @@ static void listboxPlace(newtComponent co, int newLeft, int newTop) {
 
     if (li->sb)
        li->sb->ops->place(li->sb, co->left + co->width - li->bdxAdjust - 1,
-                          co->top);
+                          co->top + li->bdyAdjust);
 }
 
 newtComponent newtListbox(int left, int top, int height, int flags) {
@@ -200,7 +200,8 @@ void newtListboxSetWidth(newtComponent co, int width) {
     co->width = width;
     li->curWidth = co->width - li->sbAdjust - 2 * li->bdxAdjust;
     li->userHasSetWidth = 1;
-    if (li->sb) li->sb->left = co->width + co->left - 1;
+    if (li->sb)
+       li->sb->left = co->left + co->width - li->bdxAdjust - 1;
     listboxDraw(co);
 }
 
index 66280cfb88858d347a5634bde57790672493cc1e..641799a01862e7f882b6a114e4b8adf31f35585c 100644 (file)
--- a/newt.spec
+++ b/newt.spec
@@ -88,6 +88,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/libnewt.a
 
 %changelog
+- fix scrollbar positioning in listbox
 - cope with backward system time jumps (#240691)
 - free helplines and windows in newtFinished, check for overflow (#239992)
 - add release to -devel and -static requires (#238784)