From a4c986fa1b74335ed7d4c9500286467bec02af3e Mon Sep 17 00:00:00 2001 From: dan Date: Thu, 12 Jun 2003 21:21:57 +0000 Subject: [PATCH] _ fixed bug in resizing a scrollview - read both XLFDs and XFT style font names from config files (xft case only) --- WINGs/ChangeLog | 2 ++ WINGs/wfont.c | 13 +++++++++++-- WINGs/wscrollview.c | 9 +++++---- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/WINGs/ChangeLog b/WINGs/ChangeLog index 3a336d28..a6f5f53a 100644 --- a/WINGs/ChangeLog +++ b/WINGs/ChangeLog @@ -62,6 +62,8 @@ Changes since wmaker 0.80.1: ) - fixed bug in tableview (clicked row callback got incorrect row) (Carlos Torres ) +- Fixed bug in resizing a scrollview + Changes since wmaker 0.80.0: ............................ diff --git a/WINGs/wfont.c b/WINGs/wfont.c index e61e50fb..f4ae2722 100644 --- a/WINGs/wfont.c +++ b/WINGs/wfont.c @@ -320,7 +320,12 @@ WMCreateAntialiasedFont(WMScreen *scrPtr, char *fontName) * use a default medium weight and a default roman slant if they * are invalid. */ - font->font.xft = XftFontOpenXlfd(display, scrPtr->screen, fname); + printf("%s\n", fname); + if (fname[0] == '-') { + font->font.xft = XftFontOpenXlfd(display, scrPtr->screen, fname); + } else { + font->font.xft = XftFontOpenName(display, scrPtr->screen, fname); + } if (!font->font.xft) { wfree(font); wfree(fname); @@ -394,7 +399,11 @@ WMCreateAntialiasedFontSet(WMScreen *scrPtr, char *fontName) * use a default medium weight and a default roman slant if they * are invalid. */ - font->font.xft = XftFontOpenXlfd(display, scrPtr->screen, fname); + if (fname[0] == '-') { + font->font.xft = XftFontOpenXlfd(display, scrPtr->screen, fname); + } else { + font->font.xft = XftFontOpenName(display, scrPtr->screen, fname); + } if (!font->font.xft) { wfree(font); wfree(fname); diff --git a/WINGs/wscrollview.c b/WINGs/wscrollview.c index 954954e3..3fde2512 100644 --- a/WINGs/wscrollview.c +++ b/WINGs/wscrollview.c @@ -246,15 +246,16 @@ WMResizeScrollViewContent(WMScrollView *sPtr, unsigned int width, h += 4; x = 1; } - + if (sPtr->flags.hasVScroller) { - width -= W_VIEW(sPtr->hScroller)->size.width; WMResizeWidget(sPtr->vScroller, 20, h); - } + width -= W_VIEW(sPtr->vScroller)->size.width; + } + if (sPtr->flags.hasHScroller) { - height -= W_VIEW(sPtr->hScroller)->size.height; WMResizeWidget(sPtr->hScroller, w, 20); WMMoveWidget(sPtr->hScroller, x, h); + height -= W_VIEW(sPtr->hScroller)->size.height; } W_ResizeView(sPtr->view, w, h); -- 2.11.4.GIT