Skip to content

Commit 14d31e7

Browse files
committed
GUI: Introduce a slightly new look and feel
Introduce a more "modern" look and feel by flattening the frames and widgets (avoiding double border) and using a more grey-ish color scheme. To select the new style, add the "flat" keyword in the Gui.Style entry of the $(ROOTSYS)/etc/system.rootrc (or in the $(HOME)/.rootrc) file. For example: Gui.Style: modern-flat N.B. The default style is kept as "modern" for the time being
1 parent b71ffa0 commit 14d31e7

13 files changed

+110
-65
lines changed

config/rootrc.in

+5-5
Original file line numberDiff line numberDiff line change
@@ -201,20 +201,20 @@ Root.Html.Search: http://www.google.com/search?q=%s+site%3A%u+-site%3A%u%2
201201
# GUI specific settings.
202202
Gui.Backend: native
203203
Gui.Factory: native
204-
# GUI style: Modern (flat popup menus) or Classic (win 95 style)
205-
Gui.Style: Modern
204+
# GUI style: modern (flat popup menus), modern-flat (flat frames), or classic (win 95 style)
205+
Gui.Style: modern
206206
Gui.DefaultFont: -*-helvetica-medium-r-*-*-12-*-*-*-*-*-iso8859-1
207207
Gui.MenuFont: -*-helvetica-medium-r-*-*-12-*-*-*-*-*-iso8859-1
208208
Gui.MenuHiFont: -*-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1
209209
Gui.DocFixedFont: -*-courier-medium-r-*-*-12-*-*-*-*-*-iso8859-1
210210
Gui.DocPropFont: -*-helvetica-medium-r-*-*-12-*-*-*-*-*-iso8859-1
211211
Gui.IconFont: -*-helvetica-medium-r-*-*-10-*-*-*-*-*-iso8859-1
212212
Gui.StatusFont: -*-helvetica-medium-r-*-*-10-*-*-*-*-*-iso8859-1
213-
Gui.BackgroundColor: #e0e0e0
213+
Gui.BackgroundColor: #e8e8e8
214214
Gui.ForegroundColor: black
215215
Gui.HighLightColor: #d0d0d0
216-
Gui.SelectBackgroundColor: #86abd9
217-
Gui.SelectForegroundColor: white
216+
Gui.SelectBackgroundColor: #d0d0d0
217+
Gui.SelectForegroundColor: black
218218
Gui.DocumentBackgroundColor: white
219219
Gui.DocumentForegroundColor: black
220220
Gui.TooltipBackgroundColor: LightYellow

gui/gui/src/TGCanvas.cxx

+1-1
Original file line numberDiff line numberDiff line change
@@ -2203,7 +2203,7 @@ void TGCanvas::DrawBorder()
22032203
gVirtualX->DrawLine(fId, GetShadowGC()(), 0, 0, 0, fHeight-2);
22042204
gVirtualX->DrawLine(fId, GetBlackGC()(), 1, 1, fWidth-3, 1);
22052205
gVirtualX->DrawLine(fId, GetBlackGC()(), 1, 1, 1, fHeight-3);
2206-
2206+
if (gClient->GetStyle() > 1) break;
22072207
gVirtualX->DrawLine(fId, GetHilightGC()(), 0, fHeight-1, fWidth-1, fHeight-1);
22082208
gVirtualX->DrawLine(fId, GetHilightGC()(), fWidth-1, fHeight-1, fWidth-1, 0);
22092209
gVirtualX->DrawLine(fId, GetBckgndGC()(), 1, fHeight-2, fWidth-2, fHeight-2);

gui/gui/src/TGClient.cxx

+3-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,9 @@ TGClient::TGClient(const char *dpyName)
204204

205205
fStyle = 0;
206206
TString style = gEnv->GetValue("Gui.Style", "modern");
207-
if (style.Contains("modern", TString::kIgnoreCase))
207+
if (style.Contains("flat", TString::kIgnoreCase))
208+
fStyle = 2;
209+
else if (style.Contains("modern", TString::kIgnoreCase))
208210
fStyle = 1;
209211

210212
gClientGlobal = this;

gui/gui/src/TGComboBox.cxx

+1-1
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ void TGComboBox::DrawBorder()
335335
gVirtualX->DrawLine(fId, GetShadowGC()(), 0, 0, 0, fHeight-2);
336336
gVirtualX->DrawLine(fId, GetBlackGC()(), 1, 1, fWidth-3, 1);
337337
gVirtualX->DrawLine(fId, GetBlackGC()(), 1, 1, 1, fHeight-3);
338-
338+
if (gClient->GetStyle() > 1) break;
339339
gVirtualX->DrawLine(fId, GetHilightGC()(), 0, fHeight-1, fWidth-1, fHeight-1);
340340
gVirtualX->DrawLine(fId, GetHilightGC()(), fWidth-1, fHeight-1, fWidth-1, 0);
341341
gVirtualX->DrawLine(fId, GetBckgndGC()(), 1, fHeight-2, fWidth-2, fHeight-2);

gui/gui/src/TGCommandPlugin.cxx

+6-5
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,13 @@ TGCommandPlugin::TGCommandPlugin(const TGWindow *p, UInt_t w, UInt_t h) :
4848
kLHintsExpandX, 3, 3, 3, 3));
4949
fCommand->Connect("ReturnPressed()", "TGCommandPlugin", this,
5050
"HandleCommand()");
51-
52-
Pixel_t pxl;
53-
gClient->GetColorByName("#3399ff", pxl);
5451
fStatus = new TGTextView(this, 10, 100, 1);
55-
fStatus->SetSelectBack(pxl);
56-
fStatus->SetSelectFore(TGFrame::GetWhitePixel());
52+
if (gClient->GetStyle() < 2) {
53+
Pixel_t pxl;
54+
gClient->GetColorByName("#a0a0a0", pxl);
55+
fStatus->SetSelectBack(pxl);
56+
fStatus->SetSelectFore(TGFrame::GetWhitePixel());
57+
}
5758
AddFrame(fStatus, new TGLayoutHints(kLHintsLeft | kLHintsTop |
5859
kLHintsExpandX | kLHintsExpandY, 3, 3, 3, 3));
5960
fPid = gSystem->GetPid();

gui/gui/src/TGFrame.cxx

+37-20
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ TGFrame::TGFrame(const TGWindow *p, UInt_t w, UInt_t h,
169169
fFE = 0;
170170

171171
if (fOptions & (kSunkenFrame | kRaisedFrame))
172-
fBorderWidth = (fOptions & kDoubleBorder) ? 2 : 1;
172+
fBorderWidth = (gClient->GetStyle() > 1) ? 1 : (fOptions & kDoubleBorder) ? 2 : 1;
173173

174174
wattr.fMask = kWABackPixel | kWAEventMask;
175175
wattr.fBackgroundPixel = back;
@@ -186,6 +186,9 @@ TGFrame::TGFrame(const TGWindow *p, UInt_t w, UInt_t h,
186186
}
187187
fEventMask = (UInt_t) wattr.fEventMask;
188188

189+
if ((fOptions & kDoubleBorder) && (gClient->GetStyle() > 1))
190+
ChangeOptions(fOptions ^ kDoubleBorder);
191+
189192
SetWindowName();
190193
}
191194

@@ -303,7 +306,7 @@ void TGFrame::ChangeOptions(UInt_t options)
303306
(fOptions & (kDoubleBorder | kSunkenFrame | kRaisedFrame))) {
304307
if (!InheritsFrom(TGGroupFrame::Class())) {
305308
if (options & (kSunkenFrame | kRaisedFrame))
306-
fBorderWidth = (options & kDoubleBorder) ? 2 : 1;
309+
fBorderWidth = (gClient->GetStyle() > 1) ? 1 : (fOptions & kDoubleBorder) ? 2 : 1;
307310
else
308311
fBorderWidth = 0;
309312
}
@@ -345,15 +348,22 @@ void TGFrame::Draw3dRectangle(UInt_t type, Int_t x, Int_t y,
345348
break;
346349

347350
case kSunkenFrame | kDoubleBorder:
348-
gVirtualX->DrawLine(fId, GetShadowGC()(), x, y, x+w-2, y);
349-
gVirtualX->DrawLine(fId, GetShadowGC()(), x, y, x, y+h-2);
350-
gVirtualX->DrawLine(fId, GetBlackGC()(), x+1, y+1, x+w-3, y+1);
351-
gVirtualX->DrawLine(fId, GetBlackGC()(), x+1, y+1, x+1, y+h-3);
352-
353-
gVirtualX->DrawLine(fId, GetHilightGC()(), x, y+h-1, x+w-1, y+h-1);
354-
gVirtualX->DrawLine(fId, GetHilightGC()(), x+w-1, y+h-1, x+w-1, y);
355-
gVirtualX->DrawLine(fId, GetBckgndGC()(), x+1, y+h-2, x+w-2, y+h-2);
356-
gVirtualX->DrawLine(fId, GetBckgndGC()(), x+w-2, y+1, x+w-2, y+h-2);
351+
if (gClient->GetStyle() < 2) {
352+
gVirtualX->DrawLine(fId, GetShadowGC()(), x, y, x+w-2, y);
353+
gVirtualX->DrawLine(fId, GetShadowGC()(), x, y, x, y+h-2);
354+
gVirtualX->DrawLine(fId, GetBlackGC()(), x+1, y+1, x+w-3, y+1);
355+
gVirtualX->DrawLine(fId, GetBlackGC()(), x+1, y+1, x+1, y+h-3);
356+
gVirtualX->DrawLine(fId, GetHilightGC()(), x, y+h-1, x+w-1, y+h-1);
357+
gVirtualX->DrawLine(fId, GetHilightGC()(), x+w-1, y+h-1, x+w-1, y);
358+
gVirtualX->DrawLine(fId, GetBckgndGC()(), x+1, y+h-2, x+w-2, y+h-2);
359+
gVirtualX->DrawLine(fId, GetBckgndGC()(), x+w-2, y+1, x+w-2, y+h-2);
360+
}
361+
else {
362+
gVirtualX->DrawLine(fId, GetShadowGC()(), x, y, x+w-2, y);
363+
gVirtualX->DrawLine(fId, GetShadowGC()(), x, y, x, y+h-2);
364+
gVirtualX->DrawLine(fId, GetHilightGC()(), x, y+h-1, x+w-1, y+h-1);
365+
gVirtualX->DrawLine(fId, GetHilightGC()(), x+w-1, y+h-1, x+w-1, y);
366+
}
357367
break;
358368

359369
case kRaisedFrame:
@@ -364,15 +374,22 @@ void TGFrame::Draw3dRectangle(UInt_t type, Int_t x, Int_t y,
364374
break;
365375

366376
case kRaisedFrame | kDoubleBorder:
367-
gVirtualX->DrawLine(fId, GetHilightGC()(), x, y, x+w-2, y);
368-
gVirtualX->DrawLine(fId, GetHilightGC()(), x, y, x, y+h-2);
369-
gVirtualX->DrawLine(fId, GetBckgndGC()(), x+1, y+1, x+w-3, y+1);
370-
gVirtualX->DrawLine(fId, GetBckgndGC()(), x+1, y+1, x+1, y+h-3);
371-
372-
gVirtualX->DrawLine(fId, GetShadowGC()(), x+1, y+h-2, x+w-2, y+h-2);
373-
gVirtualX->DrawLine(fId, GetShadowGC()(), x+w-2, y+h-2, x+w-2, y+1);
374-
gVirtualX->DrawLine(fId, GetBlackGC()(), x, y+h-1, x+w-1, y+h-1);
375-
gVirtualX->DrawLine(fId, GetBlackGC()(), x+w-1, y+h-1, x+w-1, y);
377+
if (gClient->GetStyle() < 2) {
378+
gVirtualX->DrawLine(fId, GetHilightGC()(), x, y, x+w-2, y);
379+
gVirtualX->DrawLine(fId, GetHilightGC()(), x, y, x, y+h-2);
380+
gVirtualX->DrawLine(fId, GetBckgndGC()(), x+1, y+1, x+w-3, y+1);
381+
gVirtualX->DrawLine(fId, GetBckgndGC()(), x+1, y+1, x+1, y+h-3);
382+
gVirtualX->DrawLine(fId, GetShadowGC()(), x+1, y+h-2, x+w-2, y+h-2);
383+
gVirtualX->DrawLine(fId, GetShadowGC()(), x+w-2, y+h-2, x+w-2, y+1);
384+
gVirtualX->DrawLine(fId, GetBlackGC()(), x, y+h-1, x+w-1, y+h-1);
385+
gVirtualX->DrawLine(fId, GetBlackGC()(), x+w-1, y+h-1, x+w-1, y);
386+
}
387+
else {
388+
gVirtualX->DrawLine(fId, GetHilightGC()(), x, y, x+w-2, y);
389+
gVirtualX->DrawLine(fId, GetHilightGC()(), x, y, x, y+h-2);
390+
gVirtualX->DrawLine(fId, GetShadowGC()(), x, y+h-1, x+w-1, y+h-1);
391+
gVirtualX->DrawLine(fId, GetShadowGC()(), x+w-1, y+h-1, x+w-1, y);
392+
}
376393
break;
377394

378395
default:

gui/gui/src/TGListBox.cxx

+2-1
Original file line numberDiff line numberDiff line change
@@ -1181,12 +1181,13 @@ void TGListBox::DrawBorder()
11811181
// Draw borders of the list box widget.
11821182

11831183
switch (fOptions & (kSunkenFrame | kRaisedFrame | kDoubleBorder)) {
1184+
11841185
case kSunkenFrame | kDoubleBorder:
11851186
gVirtualX->DrawLine(fId, GetShadowGC()(), 0, 0, fWidth-2, 0);
11861187
gVirtualX->DrawLine(fId, GetShadowGC()(), 0, 0, 0, fHeight-2);
11871188
gVirtualX->DrawLine(fId, GetBlackGC()(), 1, 1, fWidth-3, 1);
11881189
gVirtualX->DrawLine(fId, GetBlackGC()(), 1, 1, 1, fHeight-3);
1189-
1190+
if (gClient->GetStyle() > 1) break;
11901191
gVirtualX->DrawLine(fId, GetHilightGC()(), 0, fHeight-1, fWidth-1, fHeight-1);
11911192
gVirtualX->DrawLine(fId, GetHilightGC()(), fWidth-1, fHeight-1, fWidth-1, 0);
11921193
gVirtualX->DrawLine(fId, GetBckgndGC()(), 1, fHeight-2, fWidth-2, fHeight-2);

gui/gui/src/TGMenu.cxx

+20-2
Original file line numberDiff line numberDiff line change
@@ -1525,6 +1525,9 @@ void TGPopupMenu::DrawEntry(TGMenuEntry *entry)
15251525
if ((entry->fStatus & kMenuActiveMask) && entry->fType != kMenuLabel) {
15261526
gVirtualX->FillRectangle(fId, fSelbackGC, entry->fEx+1, entry->fEy-1,
15271527
fMenuWidth-6, entry->fEh);
1528+
if (gClient->GetStyle() > 1)
1529+
gVirtualX->DrawRectangle(fId, GetShadowGC()(), entry->fEx+1, entry->fEy-2,
1530+
fMenuWidth-7, entry->fEh);
15281531
if (entry->fType == kMenuPopup)
15291532
DrawTrianglePattern(fSelGC, fMenuWidth-10, entry->fEy+fEntrySep, fMenuWidth-6, entry->fEy+11);
15301533
if (entry->fStatus & kMenuCheckedMask)
@@ -1540,6 +1543,9 @@ void TGPopupMenu::DrawEntry(TGMenuEntry *entry)
15401543
entry->fShortcut->Draw(fId, (entry->fStatus & kMenuEnableMask) ? fSelGC : GetShadowGC()(),
15411544
fMenuWidth - tw, ty);
15421545
} else {
1546+
if (gClient->GetStyle() > 1)
1547+
gVirtualX->DrawRectangle(fId, GetBckgndGC()(), entry->fEx+1, entry->fEy-2,
1548+
fMenuWidth-7, entry->fEh);
15431549
gVirtualX->FillRectangle(fId, GetBckgndGC()(), entry->fEx+1, entry->fEy-1,
15441550
fMenuWidth-6, entry->fEh);
15451551
if (entry->fType == kMenuPopup)
@@ -2076,7 +2082,13 @@ void TGMenuTitle::DoRedraw()
20762082

20772083
if (fState) {
20782084
gVirtualX->SetForeground(fNormGC, GetDefaultSelectedBackground());
2079-
gVirtualX->FillRectangle(fId,fNormGC, 0, 0, fWidth, fHeight);
2085+
if (gClient->GetStyle() > 1) {
2086+
gVirtualX->FillRectangle(fId, fNormGC, 1, 2, fWidth-3, fHeight-4);
2087+
gVirtualX->DrawRectangle(fId, GetShadowGC()(), 1, 1, fWidth-3, fHeight-3);
2088+
}
2089+
else {
2090+
gVirtualX->FillRectangle(fId, fNormGC, 0, 0, fWidth, fHeight);
2091+
}
20802092
gVirtualX->SetForeground(fNormGC, GetForeground());
20812093
fLabel->Draw(fId, fSelGC, x, y + max_ascent);
20822094
} else {
@@ -2085,7 +2097,13 @@ void TGMenuTitle::DoRedraw()
20852097
if (fMenu && fMenu->fMenuBar && fMenu->fMenuBar->GetBackground() != back)
20862098
back = fMenu->fMenuBar->GetBackground();
20872099
gVirtualX->SetForeground(fNormGC, back);
2088-
gVirtualX->FillRectangle(fId,fNormGC, 0, 0, fWidth, fHeight);
2100+
if (gClient->GetStyle() > 1) {
2101+
gVirtualX->DrawRectangle(fId, fNormGC, 1, 1, fWidth-3, fHeight-3);
2102+
gVirtualX->FillRectangle(fId, fNormGC, 1, 2, fWidth-3, fHeight-4);
2103+
}
2104+
else {
2105+
gVirtualX->FillRectangle(fId, fNormGC, 0, 0, fWidth, fHeight);
2106+
}
20892107
gVirtualX->SetForeground(fNormGC, fTextColor);
20902108
fLabel->Draw(fId, fNormGC, x, y + max_ascent);
20912109
if (fTextColor != GetForeground())

gui/gui/src/TGScrollBar.cxx

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ TGScrollBarElement::TGScrollBarElement(const TGWindow *p, const TGPicture *pic,
9292
fState = kButtonUp;
9393
fPicD = 0;
9494
fStyle = 0;
95-
if (p && p->InheritsFrom("TGScrollBar"))
95+
if ((gClient->GetStyle() > 1) || (p && p->InheritsFrom("TGScrollBar")))
9696
fStyle = gClient->GetStyle();
9797

9898
fBgndColor = fBackground;

gui/gui/src/TGTab.cxx

+4-2
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,10 @@ void TGTabElement::DrawBorder()
100100
gVirtualX->DrawLine(fId, GetHilightGC()(), 0, 2, 2, 0);
101101
gVirtualX->DrawLine(fId, GetHilightGC()(), 2, 0, fWidth-3, 0);
102102
gVirtualX->DrawLine(fId, GetShadowGC()(), fWidth-2, 1, fWidth-2, fHeight-1);
103-
gVirtualX->DrawLine(fId, GetBlackGC()(), fWidth-2, 1, fWidth-1, 2);
104-
gVirtualX->DrawLine(fId, GetBlackGC()(), fWidth-1, 2, fWidth-1, fHeight-2);
103+
if (gClient->GetStyle() < 2) {
104+
gVirtualX->DrawLine(fId, GetBlackGC()(), fWidth-2, 1, fWidth-1, 2);
105+
gVirtualX->DrawLine(fId, GetBlackGC()(), fWidth-1, 2, fWidth-1, fHeight-2);
106+
}
105107
gVirtualX->DrawLine(fId, GetHilightGC()(), fWidth-1, fHeight-1, fWidth-1, fHeight-1);
106108

107109
if (fText) {

gui/gui/src/TGTextEditor.cxx

+6-4
Original file line numberDiff line numberDiff line change
@@ -426,10 +426,12 @@ void TGTextEditor::Build()
426426
fToolBar->GetButton(kM_EDIT_PASTE)->SetState(kButtonDisabled);
427427

428428
fTextEdit = new TGTextEdit(this, 10, 10, 1);
429-
Pixel_t pxl;
430-
gClient->GetColorByName("#3399ff", pxl);
431-
fTextEdit->SetSelectBack(pxl);
432-
fTextEdit->SetSelectFore(TGFrame::GetWhitePixel());
429+
if (gClient->GetStyle() < 2) {
430+
Pixel_t pxl;
431+
gClient->GetColorByName("#3399ff", pxl);
432+
fTextEdit->SetSelectBack(pxl);
433+
fTextEdit->SetSelectFore(TGFrame::GetWhitePixel());
434+
}
433435
fTextEdit->Associate(this);
434436
AddFrame(fTextEdit, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
435437

gui/gui/src/TGTextEntry.cxx

+12-11
Original file line numberDiff line numberDiff line change
@@ -1060,17 +1060,18 @@ void TGTextEntry::DrawBorder()
10601060

10611061
switch (fOptions & (kSunkenFrame | kRaisedFrame | kDoubleBorder)) {
10621062
case kSunkenFrame | kDoubleBorder:
1063-
gVirtualX->DrawLine(fId, GetShadowGC()(), 0, 0, fWidth-2, 0);
1064-
gVirtualX->DrawLine(fId, GetShadowGC()(), 0, 0, 0, fHeight-2);
1065-
gVirtualX->DrawLine(fId, GetBlackGC()(), 1, 1, fWidth-3, 1);
1066-
gVirtualX->DrawLine(fId, GetBlackGC()(), 1, 1, 1, fHeight-3);
1067-
1068-
gVirtualX->DrawLine(fId, GetHilightGC()(), 0, fHeight-1, fWidth-1, fHeight-1);
1069-
gVirtualX->DrawLine(fId, GetHilightGC()(), fWidth-1, fHeight-1, fWidth-1, 0);
1070-
gVirtualX->DrawLine(fId, GetBckgndGC()(), 1, fHeight-2, fWidth-2, fHeight-2);
1071-
gVirtualX->DrawLine(fId, GetBckgndGC()(), fWidth-2, 1, fWidth-2, fHeight-2);
1072-
break;
1073-
1063+
if (gClient->GetStyle() < 2) {
1064+
gVirtualX->DrawLine(fId, GetShadowGC()(), 0, 0, fWidth-2, 0);
1065+
gVirtualX->DrawLine(fId, GetShadowGC()(), 0, 0, 0, fHeight-2);
1066+
gVirtualX->DrawLine(fId, GetBlackGC()(), 1, 1, fWidth-3, 1);
1067+
gVirtualX->DrawLine(fId, GetBlackGC()(), 1, 1, 1, fHeight-3);
1068+
1069+
gVirtualX->DrawLine(fId, GetHilightGC()(), 0, fHeight-1, fWidth-1, fHeight-1);
1070+
gVirtualX->DrawLine(fId, GetHilightGC()(), fWidth-1, fHeight-1, fWidth-1, 0);
1071+
gVirtualX->DrawLine(fId, GetBckgndGC()(), 1, fHeight-2, fWidth-2, fHeight-2);
1072+
gVirtualX->DrawLine(fId, GetBckgndGC()(), fWidth-2, 1, fWidth-2, fHeight-2);
1073+
break;
1074+
}
10741075
default:
10751076
TGFrame::DrawBorder();
10761077
break;

gui/gui/src/TGView.cxx

+12-11
Original file line numberDiff line numberDiff line change
@@ -428,17 +428,18 @@ void TGView::DrawBorder()
428428

429429
switch (fOptions & (kSunkenFrame | kRaisedFrame | kDoubleBorder)) {
430430
case kSunkenFrame | kDoubleBorder:
431-
gVirtualX->DrawLine(fId, GetShadowGC()(), 0, 0, fWidth-2, 0);
432-
gVirtualX->DrawLine(fId, GetShadowGC()(), 0, 0, 0, fHeight-2);
433-
gVirtualX->DrawLine(fId, GetBlackGC()(), 1, 1, fWidth-3, 1);
434-
gVirtualX->DrawLine(fId, GetBlackGC()(), 1, 1, 1, fHeight-3);
435-
436-
gVirtualX->DrawLine(fId, GetHilightGC()(), 0, fHeight-1, fWidth-1, fHeight-1);
437-
gVirtualX->DrawLine(fId, GetHilightGC()(), fWidth-1, fHeight-1, fWidth-1, 0);
438-
gVirtualX->DrawLine(fId, GetBckgndGC()(), 1, fHeight-2, fWidth-2, fHeight-2);
439-
gVirtualX->DrawLine(fId, GetBckgndGC()(), fWidth-2, 1, fWidth-2, fHeight-2);
440-
break;
441-
431+
if (gClient->GetStyle() < 2) {
432+
gVirtualX->DrawLine(fId, GetShadowGC()(), 0, 0, fWidth-2, 0);
433+
gVirtualX->DrawLine(fId, GetShadowGC()(), 0, 0, 0, fHeight-2);
434+
gVirtualX->DrawLine(fId, GetBlackGC()(), 1, 1, fWidth-3, 1);
435+
gVirtualX->DrawLine(fId, GetBlackGC()(), 1, 1, 1, fHeight-3);
436+
437+
gVirtualX->DrawLine(fId, GetHilightGC()(), 0, fHeight-1, fWidth-1, fHeight-1);
438+
gVirtualX->DrawLine(fId, GetHilightGC()(), fWidth-1, fHeight-1, fWidth-1, 0);
439+
gVirtualX->DrawLine(fId, GetBckgndGC()(), 1, fHeight-2, fWidth-2, fHeight-2);
440+
gVirtualX->DrawLine(fId, GetBckgndGC()(), fWidth-2, 1, fWidth-2, fHeight-2);
441+
break;
442+
}
442443
default:
443444
TGFrame::DrawBorder();
444445
break;

0 commit comments

Comments
 (0)