1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 20:38:08 +01:00

WPrefs: updates to FrameBorderColor/FrameSelectedBorderColor options

In response to Amadeusz's comments regarding my patch "WPrefs: Add ability to
edit FrameBorderColor/FrameSelectedBorderColor", this new patch attempts to
reduce the confusion between focused and selected windows.  In particular,
only the frame border color for non-selected windows appears in the preview.
The frame border color for selected window colors can still be changed, but it
does not appear in the preview.  In addition, the hand icon has been removed
from the preview for these two options.

I also looked into the possibility of adding a new border color for focused
windows.  This appears to be nontrivial, as the border color belongs to
WFrameWindow, but the state of being focused belongs to WWindow.
This commit is contained in:
Doug Torrance
2014-05-18 22:17:04 -05:00
committed by Carlos R. Mafra
parent ca9dd144ae
commit 13a9ebedcf

View File

@@ -388,8 +388,8 @@ static WMRect previewColorPositions[] = {
{{30, 160}, {90, 20}}, {{30, 160}, {90, 20}},
{{30, 180}, {90, 20}}, {{30, 180}, {90, 20}},
{{30, 200}, {90, 20}}, {{30, 200}, {90, 20}},
{{30, 40}, {190, 20}}, {{0, 0}, {0, 0}},
{{30, 10}, {190, 20}}, {{0, 0}, {0, 0}},
{{155, 130}, {64, 64}}, {{155, 130}, {64, 64}},
{{155, 130}, {64, 64}}, {{155, 130}, {64, 64}},
{{155, 130}, {64, 64}}, {{155, 130}, {64, 64}},
@@ -785,7 +785,7 @@ static void updatePreviewBox(_Panel * panel, int elements)
if (elements & (1 << PFOCUSED)) { if (elements & (1 << PFOCUSED)) {
renderPreview(panel, gc, PFOCUSED, RBEV_RAISED2); renderPreview(panel, gc, PFOCUSED, RBEV_RAISED2);
colorUpdate |= 1 << FTITLE_COL | 1 << FSBORDER_COL; colorUpdate |= 1 << FTITLE_COL | 1 << FBORDER_COL;
} }
if (elements & (1 << PUNFOCUSED)) { if (elements & (1 << PUNFOCUSED)) {
renderPreview(panel, gc, PUNFOCUSED, RBEV_RAISED2); renderPreview(panel, gc, PUNFOCUSED, RBEV_RAISED2);
@@ -1365,8 +1365,8 @@ static void changeColorPage(WMWidget * w, void *data)
{5, 160}, {5, 160},
{5, 180}, {5, 180},
{5, 180}, {5, 180},
{5, 40}, {-22, -21},
{5, 10}, {-22, -21},
{130, 140}, {130, 140},
{130, 140}, {130, 140},
{130, 140}, {130, 140},
@@ -1487,6 +1487,12 @@ static void updateColorPreviewBox(_Panel * panel, int elements)
_("Highlighted")); _("Highlighted"));
} }
if (elements & (1 << FBORDER_COL)) { if (elements & (1 << FBORDER_COL)) {
XDrawRectangle(dpy, pnot,
WMColorGC(panel->colors[FBORDER_COL]),
29, 9, 190, 20);
XDrawRectangle(dpy, d,
WMColorGC(panel->colors[FBORDER_COL]),
29, 9, 190, 20);
XDrawRectangle(dpy, pnot, XDrawRectangle(dpy, pnot,
WMColorGC(panel->colors[FBORDER_COL]), WMColorGC(panel->colors[FBORDER_COL]),
29, 39, 190, 20); 29, 39, 190, 20);
@@ -1536,16 +1542,6 @@ static void updateColorPreviewBox(_Panel * panel, int elements)
WMColorGC(panel->colors[FBORDER_COL]), WMColorGC(panel->colors[FBORDER_COL]),
119, 120, 119, 220); 119, 120, 119, 220);
} }
if (elements & (1 << FSBORDER_COL)) {
XDrawRectangle(dpy, pnot,
WMColorGC(panel->
colors[FSBORDER_COL]),
29, 9, 190, 20);
XDrawRectangle(dpy, d,
WMColorGC(panel->
colors[FSBORDER_COL]),
29, 9, 190, 20);
}
/* /*
if (elements & (1 << ICONT_COL)) { if (elements & (1 << ICONT_COL)) {
@@ -1838,8 +1834,8 @@ static void createPanel(Panel * p)
WMAddPopUpButtonItem(panel->colP, _("Disabled Menu Item Text")); WMAddPopUpButtonItem(panel->colP, _("Disabled Menu Item Text"));
WMAddPopUpButtonItem(panel->colP, _("Menu Highlight Color")); WMAddPopUpButtonItem(panel->colP, _("Menu Highlight Color"));
WMAddPopUpButtonItem(panel->colP, _("Highlighted Menu Text Color")); WMAddPopUpButtonItem(panel->colP, _("Highlighted Menu Text Color"));
WMAddPopUpButtonItem(panel->colP, _("Frame Border Color")); WMAddPopUpButtonItem(panel->colP, _("Window Border Color"));
WMAddPopUpButtonItem(panel->colP, _("Selected Frame Border Color")); WMAddPopUpButtonItem(panel->colP, _("Selected Window Border Color"));
/* /*
WMAddPopUpButtonItem(panel->colP, _("Miniwindow Title")); WMAddPopUpButtonItem(panel->colP, _("Miniwindow Title"));
WMAddPopUpButtonItem(panel->colP, _("Miniwindow Title Back")); WMAddPopUpButtonItem(panel->colP, _("Miniwindow Title Back"));