mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-21 13:28:05 +01:00
InfoPanel: fix out of display text
When debug is enabled, the memory allocated details is supposed to display the free chunks but as the text length is too long it's getting out of the display area. This patch is increasing the window width to handle such case.
This commit is contained in:
committed by
Carlos R. Mafra
parent
437b76812d
commit
45ab72a78a
@@ -1220,7 +1220,11 @@ void wShowInfoPanel(WScreen *scr)
|
|||||||
|
|
||||||
panel->win = WMCreateWindow(scr->wmscreen, "info");
|
panel->win = WMCreateWindow(scr->wmscreen, "info");
|
||||||
WMGetScaleBaseFromSystemFont(scr->wmscreen, &wmScaleWidth, &wmScaleHeight);
|
WMGetScaleBaseFromSystemFont(scr->wmscreen, &wmScaleWidth, &wmScaleHeight);
|
||||||
|
#if defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO2) && defined(DEBUG)
|
||||||
|
pwidth = WMScaleX(412);
|
||||||
|
#else
|
||||||
pwidth = WMScaleX(382);
|
pwidth = WMScaleX(382);
|
||||||
|
#endif
|
||||||
pheight = WMScaleY(250);
|
pheight = WMScaleY(250);
|
||||||
WMResizeWidget(panel->win, pwidth, pheight);
|
WMResizeWidget(panel->win, pwidth, pheight);
|
||||||
|
|
||||||
@@ -1321,7 +1325,6 @@ void wShowInfoPanel(WScreen *scr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO2)
|
#if defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO2)
|
||||||
|
|
||||||
{
|
{
|
||||||
struct mallinfo2 ma = mallinfo2();
|
struct mallinfo2 ma = mallinfo2();
|
||||||
snprintf(buffer, sizeof(buffer),
|
snprintf(buffer, sizeof(buffer),
|
||||||
@@ -1395,7 +1398,11 @@ void wShowInfoPanel(WScreen *scr)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
panel->infoL = WMCreateLabel(panel->win);
|
panel->infoL = WMCreateLabel(panel->win);
|
||||||
|
#if defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO2) && defined(DEBUG)
|
||||||
|
WMResizeWidget(panel->infoL, WMScaleX(380), WMScaleY(80));
|
||||||
|
#else
|
||||||
WMResizeWidget(panel->infoL, WMScaleX(350), WMScaleY(80));
|
WMResizeWidget(panel->infoL, WMScaleX(350), WMScaleY(80));
|
||||||
|
#endif
|
||||||
WMMoveWidget(panel->infoL, WMScaleX(15), WMScaleY(115));
|
WMMoveWidget(panel->infoL, WMScaleX(15), WMScaleY(115));
|
||||||
WMSetLabelText(panel->infoL, strbuf);
|
WMSetLabelText(panel->infoL, strbuf);
|
||||||
font = WMSystemFontOfSize(scr->wmscreen, WMScaleY(11));
|
font = WMSystemFontOfSize(scr->wmscreen, WMScaleY(11));
|
||||||
|
|||||||
Reference in New Issue
Block a user