mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-04 12:54:20 +01:00
_ fixed bug in resizing a scrollview
- read both XLFDs and XFT style font names from config files (xft case only)
This commit is contained in:
@@ -62,6 +62,8 @@ Changes since wmaker 0.80.1:
|
|||||||
<ov@rbcmail.ru>)
|
<ov@rbcmail.ru>)
|
||||||
- fixed bug in tableview (clicked row callback got incorrect row) (Carlos Torres
|
- fixed bug in tableview (clicked row callback got incorrect row) (Carlos Torres
|
||||||
<vlaadbrain@operamail.com>)
|
<vlaadbrain@operamail.com>)
|
||||||
|
- Fixed bug in resizing a scrollview
|
||||||
|
|
||||||
|
|
||||||
Changes since wmaker 0.80.0:
|
Changes since wmaker 0.80.0:
|
||||||
............................
|
............................
|
||||||
|
|||||||
@@ -320,7 +320,12 @@ WMCreateAntialiasedFont(WMScreen *scrPtr, char *fontName)
|
|||||||
* use a default medium weight and a default roman slant if they
|
* use a default medium weight and a default roman slant if they
|
||||||
* are invalid.
|
* 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) {
|
if (!font->font.xft) {
|
||||||
wfree(font);
|
wfree(font);
|
||||||
wfree(fname);
|
wfree(fname);
|
||||||
@@ -394,7 +399,11 @@ WMCreateAntialiasedFontSet(WMScreen *scrPtr, char *fontName)
|
|||||||
* use a default medium weight and a default roman slant if they
|
* use a default medium weight and a default roman slant if they
|
||||||
* are invalid.
|
* 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) {
|
if (!font->font.xft) {
|
||||||
wfree(font);
|
wfree(font);
|
||||||
wfree(fname);
|
wfree(fname);
|
||||||
|
|||||||
@@ -246,15 +246,16 @@ WMResizeScrollViewContent(WMScrollView *sPtr, unsigned int width,
|
|||||||
h += 4;
|
h += 4;
|
||||||
x = 1;
|
x = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sPtr->flags.hasVScroller) {
|
if (sPtr->flags.hasVScroller) {
|
||||||
width -= W_VIEW(sPtr->hScroller)->size.width;
|
|
||||||
WMResizeWidget(sPtr->vScroller, 20, h);
|
WMResizeWidget(sPtr->vScroller, 20, h);
|
||||||
}
|
width -= W_VIEW(sPtr->vScroller)->size.width;
|
||||||
|
}
|
||||||
|
|
||||||
if (sPtr->flags.hasHScroller) {
|
if (sPtr->flags.hasHScroller) {
|
||||||
height -= W_VIEW(sPtr->hScroller)->size.height;
|
|
||||||
WMResizeWidget(sPtr->hScroller, w, 20);
|
WMResizeWidget(sPtr->hScroller, w, 20);
|
||||||
WMMoveWidget(sPtr->hScroller, x, h);
|
WMMoveWidget(sPtr->hScroller, x, h);
|
||||||
|
height -= W_VIEW(sPtr->hScroller)->size.height;
|
||||||
}
|
}
|
||||||
|
|
||||||
W_ResizeView(sPtr->view, w, h);
|
W_ResizeView(sPtr->view, w, h);
|
||||||
|
|||||||
Reference in New Issue
Block a user