mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
fixes to allow windows to size correctly for font sizes
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@251 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
a3782347ec
commit
2174495546
@ -123,12 +123,16 @@ accWindow( Widget parent )
|
||||
xmDialogShellWidgetClass, parent,
|
||||
XmNtitle, "Set Up Account",
|
||||
XmNdeleteResponse, XmDESTROY,
|
||||
XmNwidth, 350,
|
||||
XmNminWidth, 350,
|
||||
XmNmaxWidth, 350,
|
||||
XmNheight, 340,
|
||||
XmNminHeight, 340,
|
||||
XmNmaxHeight, 340,
|
||||
/*
|
||||
* Let the window find it's own size,
|
||||
* based on the font size.
|
||||
* XmNwidth, 350,
|
||||
* XmNminWidth, 350,
|
||||
* XmNmaxWidth, 350,
|
||||
* XmNheight, 340,
|
||||
* XmNminHeight, 340,
|
||||
* XmNmaxHeight, 340,
|
||||
*/
|
||||
XmNresizable, FALSE,
|
||||
XmNallowShellResize, FALSE,
|
||||
/* XmNtransient, FALSE, */ /* allow window to be repositioned */
|
||||
@ -409,12 +413,16 @@ editAccWindow( Widget parent, Account *account )
|
||||
xmDialogShellWidgetClass, parent,
|
||||
XmNtitle, "Edit Account",
|
||||
XmNdeleteResponse, XmDESTROY,
|
||||
XmNwidth, 350,
|
||||
XmNminWidth, 350,
|
||||
XmNmaxWidth, 350,
|
||||
XmNheight, 150,
|
||||
XmNminHeight, 150,
|
||||
XmNmaxHeight, 150,
|
||||
/*
|
||||
* Let the window find it's own size,
|
||||
* based on the size of the font.
|
||||
* XmNwidth, 350,
|
||||
* XmNminWidth, 350,
|
||||
* XmNmaxWidth, 350,
|
||||
* XmNheight, 150,
|
||||
* XmNminHeight, 150,
|
||||
* XmNmaxHeight, 150,
|
||||
*/
|
||||
XmNresizable, FALSE,
|
||||
XmNallowShellResize, FALSE,
|
||||
XmNtransient, FALSE, /* allow window to be repositioned */
|
||||
|
@ -54,6 +54,7 @@
|
||||
#include <Xm/ToggleBG.h>
|
||||
#include <Xm/PushB.h>
|
||||
#include <Xm/PushBG.h>
|
||||
#include <Xm/CascadeB.h>
|
||||
#include <Xm/CascadeBG.h>
|
||||
#include <Xm/Label.h>
|
||||
#include <Xm/LabelG.h>
|
||||
@ -194,7 +195,8 @@ Widget BuildMenu( Widget parent, int menu_type, char *menu_title,
|
||||
{
|
||||
str = XmStringCreateLocalized (menu_title);
|
||||
cascade = XtVaCreateManagedWidget( menu_title,
|
||||
xmCascadeButtonGadgetClass, parent,
|
||||
/* xmCascadeButtonGadgetClass, parent, */
|
||||
xmCascadeButtonWidgetClass, parent,
|
||||
XmNsubMenuId, menu,
|
||||
XmNlabelString, str,
|
||||
XmNmnemonic, menu_mnemonic,
|
||||
|
@ -173,8 +173,13 @@ xaccMainWindowAddAcct (Widget acctrix, AccountGroup *grp, int depth )
|
||||
if (acc->children) {
|
||||
/* if the arrow button doesn't exist, add it */
|
||||
if (NULL == acc->arrowb) {
|
||||
int height;
|
||||
/* adjust arrow size for font size */
|
||||
height = XbaeMatrixGetRowPixelHeight (acctrix);
|
||||
acc->arrowb = XtVaCreateManagedWidget ("accarrow",
|
||||
xmArrowButtonWidgetClass, acctrix,
|
||||
XmNwidth, height,
|
||||
XmNheight, height,
|
||||
XmNshadowThickness, 0,
|
||||
XmNarrowDirection, XmARROW_DOWN,
|
||||
NULL);
|
||||
@ -464,8 +469,12 @@ mainWindow( Widget parent )
|
||||
mainwindow = XtVaCreateManagedWidget( "mainwindow",
|
||||
xmMainWindowWidgetClass, parent,
|
||||
XmNdeleteResponse, XmDESTROY,
|
||||
XmNwidth, 450,
|
||||
XmNheight, 240,
|
||||
/*
|
||||
* Let the window find its own size,
|
||||
* based on the font sizes.
|
||||
* XmNwidth, 450,
|
||||
* XmNheight, 240,
|
||||
*/
|
||||
NULL );
|
||||
|
||||
/* Umm... this doesn't seem to be getting called */
|
||||
|
@ -1843,15 +1843,17 @@ regWindowLedger( Widget parent, Account **acclist, int ledger_type )
|
||||
xmDialogShellWidgetClass, parent,
|
||||
XmNdeleteResponse, XmDESTROY,
|
||||
XmNtitle, windowname,
|
||||
/*
|
||||
XmNwidth, 395,
|
||||
XmNheight, 400,
|
||||
XmNminWidth, 495,
|
||||
XmNmaxWidth, 495,
|
||||
XmNminHeight, 500,
|
||||
*/
|
||||
/* XmNresizable, FALSE, */
|
||||
/* XmNallowShellResize, FALSE, */
|
||||
/*
|
||||
* Let the window find ti's own size,
|
||||
* based on the size of the fonts.
|
||||
* XmNwidth, 395,
|
||||
* XmNheight, 400,
|
||||
* XmNminWidth, 495,
|
||||
* XmNmaxWidth, 495,
|
||||
* XmNminHeight, 500,
|
||||
*/
|
||||
/* XmNresizable, False, */
|
||||
/* XmNallowShellResize, False, */
|
||||
XmNtransient, FALSE, /* allow window to be repositioned */
|
||||
NULL );
|
||||
|
||||
@ -2283,22 +2285,24 @@ regWindowLedger( Widget parent, Account **acclist, int ledger_type )
|
||||
|
||||
/* create action box for the first time */
|
||||
{
|
||||
int width;
|
||||
int width, downwidth;
|
||||
width = XbaeMatrixGetColumnPixelWidth (reg, regData->cellColLocation[ACTN_CELL_ID]);
|
||||
/* hack alert -- we do want popbox drop-down width to be font dependant */
|
||||
regData->actbox = actionBox (reg, width, 55);
|
||||
/* it would be nice if ComboBox had an XmNunits resource ... but it doesn't */
|
||||
downwidth = (int) (1.3 * ((float) width));
|
||||
regData->actbox = actionBox (reg, width, downwidth);
|
||||
}
|
||||
|
||||
/* create the xfer account box for the first time */
|
||||
/* but first, find the topmost group */
|
||||
{
|
||||
AccountGroup *grp;
|
||||
int width;
|
||||
int width, downwidth;
|
||||
grp = xaccGetRootGroupOfAcct (regData->blackacc[0]);
|
||||
width = XbaeMatrixGetColumnPixelWidth (reg, regData->cellColLocation[XFRM_CELL_ID]);
|
||||
/* hack alert -- we do want popbox drop-down width to be font dependant */
|
||||
regData->xfrmbox = xferBox (reg, grp, width, 103);
|
||||
regData->xtobox = xferBox (reg, grp, width, 103);
|
||||
downwidth = (int) (1.2 * ((float) width));
|
||||
/* it would be nice if ComboBox had an XmNunits resource ... but it doesn't */
|
||||
regData->xfrmbox = xferBox (reg, grp, width, downwidth);
|
||||
regData->xtobox = xferBox (reg, grp, width, downwidth);
|
||||
}
|
||||
|
||||
/******************************************************************\
|
||||
|
@ -54,12 +54,17 @@ simpleReportWindow( Widget parent )
|
||||
xmDialogShellWidgetClass, parent,
|
||||
XmNtitle, "Report",
|
||||
XmNdeleteResponse, XmDESTROY,
|
||||
XmNwidth, 350,
|
||||
XmNminWidth, 350,
|
||||
XmNmaxWidth, 350,
|
||||
XmNheight, 300,
|
||||
XmNminHeight, 300,
|
||||
XmNmaxHeight, 300,
|
||||
/*
|
||||
* Let the window find its own size,
|
||||
* based on the size of the fonts.
|
||||
* XmNwidth, 350,
|
||||
* XmNminWidth, 350,
|
||||
* XmNmaxWidth, 350,
|
||||
* XmNheight, 300,
|
||||
* XmNminHeight, 300,
|
||||
* XmNmaxHeight, 300,
|
||||
*/
|
||||
XmNresizable, False,
|
||||
NULL );
|
||||
|
||||
/* The form to put everything in the dialog in */
|
||||
|
@ -109,12 +109,17 @@ xferWindow( Widget parent )
|
||||
xmDialogShellWidgetClass, parent,
|
||||
XmNtitle, "Transfer Money",
|
||||
XmNdeleteResponse, XmDESTROY,
|
||||
XmNwidth, 450,
|
||||
XmNminWidth, 450,
|
||||
XmNmaxWidth, 450,
|
||||
XmNheight, 230,
|
||||
XmNminHeight, 230,
|
||||
XmNmaxHeight, 230,
|
||||
/*
|
||||
* Let the window find its own size,
|
||||
* based on the size of the fonts
|
||||
* XmNwidth, 450,
|
||||
* XmNminWidth, 450,
|
||||
* XmNmaxWidth, 450,
|
||||
* XmNheight, 230,
|
||||
* XmNminHeight, 230,
|
||||
* XmNmaxHeight, 230,
|
||||
*/
|
||||
XmNresizable, False,
|
||||
NULL );
|
||||
|
||||
XtAddCallback( dialog, XmNdestroyCallback,
|
||||
|
Loading…
Reference in New Issue
Block a user