Группа :: Графические оболочки/Icewm
Пакет: icewm
Главная Изменения Спек Патчи Загрузить Bugs and FR
Патч: themable_taskWidth_taskButtons_atrayPix_1.2.27.diff
#
# This patch adds new configurable elements via theme files
#
# TaskBarHeight Height in pixels of Taskbar
# TaskButtonHeight Height of buttons in Taskbar
# TaskButtonWidth Width of taskpanel buttons
# TaskButtonSeparatorSize Distance between buttons in taskpanel
# TrayPanelUseBgPixmaps Use background pixmaps in tray panel
#
# LXP project: http://lxp.sourceforge.net
#
diff -Nruw themable.h themable.h
--- icewm-1.2.27/src/themable.h.orig 2006-08-06 20:38:16.000000000 +0200
+++ icewm-1.2.27/src/themable.h 2006-08-09 19:29:17.000000000 +0200
@@ -9,6 +9,11 @@
XIV(bool, prettyClock, true)
#endif
XIV(bool, rolloverTitleButtons, false)
+XIV(int, taskBarHeight, 0)
+XIV(int, taskButtonHeight, 0)
+XIV(int, taskButtonWidth, 0)
+XIV(int, taskButtonSepSize, 0)
+XIV(bool, trayPanelUseBgPixmaps, true)
XIV(bool, trayDrawBevel, false)
XIV(bool, titleBarCentered, false)
@@ -154,6 +159,12 @@
#ifndef LITE
OBV("RolloverButtonsSupported", &rolloverTitleButtons, "Does it support the 'O' title bar button images (for mouse rollover)"),
#endif
+ OIV("TaskBarHeight", &taskBarHeight, 0, 64, "Taskbar Height (default SmallIconSize + 8)"),
+ OIV("TaskButtonHeight", &taskButtonHeight, 0, 64, "Height for button elements in taskbar (default TaskBarHeight)"),
+ OIV("TaskButtonWidth", &taskButtonWidth, 0, 256, "Width for button elements in taskpanel (default taskPanelWidth/TaskbarButtonDivisor )"),
+ OIV("TaskButtonSeparatorSize", &taskButtonSepSize, 0, 64, "Distance between task buttons (default 0)"),
+ OBV("TrayPanelUseBgPixmaps", &trayPanelUseBgPixmaps, "TrayPanel will use the some taskbutton[..].xpm pixmaps (default true)"),
+
OBV("TaskBarClockLeds", &prettyClock, "Task bar clock/APM uses nice pixmapped LCD display (but then it doesn't display correctly in many languages anymore, e.g. for Japanese and Korean it works only when a real font is used and not the LEDs"),
OBV("TrayDrawBevel", &trayDrawBevel, "Surround the tray with plastic border"),
diff -Nruw atasks.cc atasks.cc
--- icewm-1.2.27/src/atasks.cc.orig 2006-08-06 20:38:14.000000000 +0200
+++ icewm-1.2.27/src/atasks.cc 2006-08-11 10:17:23.000000000 +0200
@@ -438,6 +442,8 @@
int rightX = width();
w = (rightX - leftX - 2) / tc;
+ w -= taskButtonSepSize;
+ w = (taskButtonWidth && w > taskButtonWidth) ? taskButtonWidth : w;
int rem = (rightX - leftX - 2) % tc;
x = leftX;
h = height();
@@ -456,7 +462,7 @@
f->setGeometry(YRect(x, y, w1, h));
f->show();
x += w1;
- x += 0;
+ x += taskButtonSepSize ;
lc++;
} else
f->hide();
diff -Nruw atray.cc atray.cc
--- icewm-1.2.27/src/atray.cc.orig 2006-08-06 20:38:15.000000000 +0200
+++ icewm-1.2.27/src/atray.cc 2006-08-09 19:14:24.000000000 +0200
@@ -116,29 +117,29 @@
} else if (getFrame()->isMinimized()) {
bg = minimizedTrayAppBg;
fg = minimizedTrayAppFg;
- bgPix = taskbuttonminimizedPixmap;
+ bgPix = trayPanelUseBgPixmaps ? taskbuttonminimizedPixmap : taskbackPixmap;
#ifdef CONFIG_GRADIENTS
- if (taskMinimizedGradient == null && taskbuttonminimizedPixbuf != null)
+ if (trayPanelUseBgPixmaps && taskMinimizedGradient == null && taskbuttonminimizedPixbuf != null)
taskMinimizedGradient = YPixbuf::scale(taskbuttonminimizedPixbuf, sw, sh);
- bgGrad = taskMinimizedGradient;
+ bgGrad = trayPanelUseBgPixmaps ? taskMinimizedGradient : getGradient();
#endif
} else if (getFrame()->focused()) {
bg = activeTrayAppBg;
fg = activeTrayAppFg;
- bgPix = taskbuttonactivePixmap;
+ bgPix = trayPanelUseBgPixmaps ? taskbuttonactivePixmap : taskbackPixmap;
#ifdef CONFIG_GRADIENTS
- if (taskActiveGradient == null && taskbuttonactivePixbuf != null)
+ if (trayPanelUseBgPixmaps && taskActiveGradient == null && taskbuttonactivePixbuf != null)
taskActiveGradient = YPixbuf::scale(taskbuttonactivePixbuf, sw, sh);
- bgGrad = taskActiveGradient;
+ bgGrad = trayPanelUseBgPixmaps ? taskActiveGradient : getGradient();
#endif
} else {
bg = normalTrayAppBg;
fg = normalTrayAppFg;
- bgPix = taskbuttonPixmap;
+ bgPix = trayPanelUseBgPixmaps ? taskbuttonPixmap : taskbackPixmap;
#ifdef CONFIG_GRADIENTS
- if (taskNormalGradient == null && taskbuttonPixbuf != null)
+ if (trayPanelUseBgPixmaps && taskNormalGradient == null && taskbuttonPixbuf != null)
taskNormalGradient = YPixbuf::scale(taskbuttonPixbuf, sw, sh);
- bgGrad = taskNormalGradient;
+ bgGrad = trayPanelUseBgPixmaps ? taskNormalGradient : getGradient();
#endif
}
@@ -156,7 +157,10 @@
else
#endif
if (bgPix != null)
+ if (trayPanelUseBgPixmaps)
g.fillPixmap(bgPix, 0, 0, width(), height(), 0, 0);
+ else
+ g.fillPixmap(bgPix, 0, 0, width(), height(), parent()->x(), parent()->y());
else {
g.setColor(bg);
g.fillRect(0, 0, width(), height());
@@ -168,7 +172,8 @@
if (icon) {
ref<YIconImage> small = icon->small();
- if (small != null) g.drawImage(small, 2, 2);
+ //Paint the icon centered
+ if (small != null) g.drawImage(small, (width()-small->width())/2, (height()-small->height())/2);
}
}
@@ -333,7 +338,7 @@
for (TrayApp *a(fFirst); a != NULL; a = a->getNext())
if (a->getShown()) tc++;
- return (tc ? 4 + tc * (height() - 4) : 1);
+ return (tc ? tc * height() : 0);
}
void TrayPane::relayoutNow() {
@@ -355,9 +361,10 @@
for (TrayApp *a(fFirst); a != NULL; a = a->getNext())
if (a->getShown()) tc++;
- w = h = height() - 4;
- x = width() - 2 - tc * w;
- y = 2;
+ w = h = height();
+ x = width() - 0 - tc * w;
+ x = x < 0 ? 0 : x;
+ y = 0;
for (TrayApp *f(fFirst); f != NULL; f = f->getNext()) {
if (f->getShown()) {
diff -Nruw objbar.cc objbar.cc
--- icewm-1.2.27/src/objbar.cc.orig 2006-08-06 20:38:16.000000000 +0200
+++ icewm-1.2.27/src/objbar.cc 2006-08-09 19:14:24.000000000 +0200
@@ -34,7 +34,7 @@
ObjectBar::ObjectBar(YWindow *parent): YWindow(parent) {
if (bgColor == 0)
bgColor = new YColor(clrDefaultTaskBar);
- setSize(1, 1);
+ setSize(0, 0);
}
ObjectBar::~ObjectBar() {
diff -Nruw wmtaskbar.cc wmtaskbar.cc
--- icewm-1.2.27/src/wmtaskbar.cc.orig 2006-08-06 20:38:14.000000000 +0200
+++ icewm-1.2.27/src/wmtaskbar.cc 2006-08-09 19:18:48.000000000 +0200
@@ -518,16 +518,16 @@
#ifndef NO_CONFIGURE_MENUS
{ fApplications, true, 1, true, 0, 0, true },
#endif
- { fShowDesktop, true, 0, true, 0, 0, true },
+ { fShowDesktop, true, 0, true, 0, 0, taskButtonHeight? false: true },
#ifdef CONFIG_WINMENU
- { fWinList, true, 0, true, 0, 0, true},
+ { fWinList, true, 0, true, 0, 0, taskButtonHeight? false: true},
#endif
#ifndef NO_CONFIGURE_MENUS
- { fObjectBar, true, 1, true, 4, 0, true },
+ { fObjectBar, true, 1, true, 4, 0, taskButtonHeight? false: true },
#endif
- { fWorkspaces, taskBarWorkspacesLeft, 0, true, 4, 4, true },
+ { fWorkspaces, taskBarWorkspacesLeft, 0, true, 4, 4, taskButtonHeight? false: true },
- { fCollapseButton, false, 0, true, 0, 2, true },
+ { fCollapseButton, false, 0, true, 0, 2, taskButtonHeight? false: true },
#ifdef CONFIG_APPLET_CLOCK
{ fClock, false, 1, true, 2, 2, false },
#endif
@@ -556,7 +556,7 @@
#endif
{ fTray2, false, 1, true, 1, 1, false },
#ifdef CONFIG_TRAY
- { fTray, false, 0, true, 1, 1, true },
+ { fTray, false, 0, true, 1, 1, taskButtonHeight? false: true },
#endif
};
const int wcount = sizeof(wlist)/sizeof(wlist[0]);
@@ -606,7 +606,7 @@
#ifdef LITE
h[0] = 16;
#else
- h[0] = YIcon::smallSize() + 8;
+ h[0] = taskBarHeight ? taskBarHeight : YIcon::smallSize() + 8;
#endif
}
@@ -624,8 +624,8 @@
if (wl->expand) {
yy = y[wl->row];
} else {
- hh = wl->w->height();
- yy = y[wl->row] + (h[wl->row] - wl->w->height()) / 2;
+ hh = taskButtonHeight ? taskButtonHeight: wl->w->height();
+ yy = y[wl->row] + (h[wl->row] - hh) / 2;
}
if (wl->left) {
@@ -648,9 +648,9 @@
if (taskBarShowWindows) {
if (fTasks) {
fTasks->setGeometry(YRect(left[0],
- y[0],
+ taskButtonHeight ? y[0] + (h[0] - taskButtonHeight)/2 : y[0],
right[0] - left[0],
- h[0]));
+ taskButtonHeight ? taskButtonHeight : h[0]));
fTasks->show();
fTasks->relayout();
}