From e0cc583669c8d94417f2c920ecb8799fa47aaed1 Mon Sep 17 00:00:00 2001 From: Giles Atkinson <“gatk555@gmail.com”> Date: Tue, 23 May 2023 17:15:02 +0100 Subject: [PATCH] Set default colours for the button box in the X11 plot window that match the default dark background of the plot. --- src/frontend/plotting/x11.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/frontend/plotting/x11.c b/src/frontend/plotting/x11.c index 8879328ac..fed83762c 100644 --- a/src/frontend/plotting/x11.c +++ b/src/frontend/plotting/x11.c @@ -449,17 +449,24 @@ X11_NewViewport(GRAPH *graph) static Arg formargs[ ] = { { XtNleft, (XtArgVal) XtChainLeft }, - { XtNresizable, (XtArgVal) TRUE } + { XtNresizable, (XtArgVal) TRUE }, + { XtNbackground, (XtArgVal) 0x191942} // MidnightBlue }; static Arg bboxargs[ ] = { { XtNfromHoriz, (XtArgVal) NULL }, { XtNbottom, (XtArgVal) XtChainTop }, { XtNtop, (XtArgVal) XtChainTop }, { XtNleft, (XtArgVal) XtChainRight }, - { XtNright, (XtArgVal) XtChainRight } + { XtNright, (XtArgVal) XtChainRight }, + { XtNbackground, (XtArgVal) 0xbebebe} + }; + static Arg quitbuttonargs[ ] = { + { XtNlabel, (XtArgVal) "Quit" }, + { XtNbackground, (XtArgVal) 0xff4500} // OrangeRed }; static Arg buttonargs[ ] = { - { XtNlabel, (XtArgVal) NULL } + { XtNlabel, (XtArgVal) NULL }, + { XtNbackground, (XtArgVal) 0x87cefa} // LightSkyBlue }; static Arg viewargs[] = { { XtNresizable, (XtArgVal) TRUE }, @@ -500,21 +507,18 @@ X11_NewViewport(GRAPH *graph) ("buttonbox", boxWidgetClass, DEVDEP(graph).form, bboxargs, XtNumber(bboxargs)); /* set up buttons */ - XtSetArg(buttonargs[0], XtNlabel, "Quit"); - XtSetArg(bboxargs[1], XtNfromVert, NULL); DEVDEP(graph).buttons[0] = XtCreateManagedWidget - ("quit", commandWidgetClass, DEVDEP(graph).buttonbox, buttonargs, 1); + ("quit", commandWidgetClass, DEVDEP(graph).buttonbox, quitbuttonargs, 2); XtAddCallback(DEVDEP(graph).buttons[0], XtNcallback, killwin, graph); XtSetArg(buttonargs[0], XtNlabel, "PostScript"); - XtSetArg(bboxargs[1], XtNfromVert, DEVDEP(graph).buttons[0]); DEVDEP(graph).buttons[1] = XtCreateManagedWidget - ("hardcopy", commandWidgetClass, DEVDEP(graph).buttonbox, buttonargs, 1); + ("hardcopy", commandWidgetClass, DEVDEP(graph).buttonbox, buttonargs, 2); XtAddCallback(DEVDEP(graph).buttons[1], XtNcallback, hardcopy, graph); XtSetArg(buttonargs[0], XtNlabel, "SVG"); DEVDEP(graph).buttons[2] = XtCreateManagedWidget( - "SVG", commandWidgetClass, DEVDEP(graph).buttonbox, buttonargs, 1); + "SVG", commandWidgetClass, DEVDEP(graph).buttonbox, buttonargs, 2); XtAddCallback(DEVDEP(graph).buttons[2], XtNcallback, hardcopySVG, graph); /* set up fonts */