New, nicer pixmaps for buttons and titlebar.

Use static pointers to QPixmaps to save memory now, as I should have
done before.

svn path=/trunk/kdebase/kwin/; revision=45067
This commit is contained in:
Rik Hemsley 2000-03-29 17:07:43 +00:00
parent 5a7b9ed8aa
commit 1a1c3254e5
16 changed files with 587 additions and 338 deletions

View file

@ -1,21 +1,18 @@
/* XPM */ /* XPM */
static char * bar_xpm[] = { static char * bar_xpm[] = {
"12 12 7 1", "12 12 4 1",
" c None", " c None",
". c #808080", ". c #808080",
"+ c #585858", "+ c #585858",
"@ c #A0A0A0", "@ c #DCDCDC",
"# c #C3C3C3",
"$ c #FFFFFF",
"% c #DCDCDC",
" ", " ",
" ", " ",
" ", " ",
" ", " ",
" .++++++++@ ", " .++++++++. ",
" +########$ ", " +@@@@@@@@+ ",
" +%%%%%%%%$ ", " +@@@@@@@@+ ",
" @$$$$$$$$$ ", " .++++++++. ",
" ", " ",
" ", " ",
" ", " ",

View file

@ -0,0 +1,28 @@
/* XPM */
static char * button_base_down_xpm[] = {
"18 18 7 1",
" c None",
". c #A0A0A0",
"+ c #FFFFFF",
"@ c #585858",
"# c #808080",
"$ c #DCDCDC",
"% c #C3C3C3",
"@@@@@@@@@@@@@@@@#%",
"@###############%+",
"@#..............$+",
"@#..............$+",
"@#..............$+",
"@#..............$+",
"@#..............$+",
"@#..............$+",
"@#..............$+",
"@#..............$+",
"@#..............$+",
"@#..............$+",
"@#..............$+",
"@#..............$+",
"@#..............$+",
"@#..............$+",
"#%$$$$$$$$$$$$$$$+",
"%+++++++++++++++++"};

View file

@ -0,0 +1,28 @@
/* XPM */
static char * button_base_up_xpm[] = {
"18 18 7 1",
" c None",
". c #C3C3C3",
"+ c #FFFFFF",
"@ c #585858",
"# c #A0A0A0",
"$ c #DCDCDC",
"% c #808080",
"+++++++++++++++++.",
"+$$$$$$$$$$$$$$$.%",
"+$..............#@",
"+$..............#@",
"+$..............#@",
"+$..............#@",
"+$..............#@",
"+$..............#@",
"+$..............#@",
"+$..............#@",
"+$..............#@",
"+$..............#@",
"+$..............#@",
"+$..............#@",
"+$..............#@",
"+$..............#@",
"+.###############@",
".%@@@@@@@@@@@@@@@@"};

View file

@ -0,0 +1,18 @@
/* XPM */
static char * button_close_xpm[] = {
"12 12 3 1",
" c None",
". c #585858",
"+ c #DCDCDC",
" .. .. ",
".++. .++.",
".+++. .+++.",
" .+++..+++. ",
" .++++++. ",
" .++++. ",
" .++++. ",
" .++++++. ",
" .+++..+++. ",
".+++. .+++.",
".++. .++.",
" .. .. "};

View file

@ -0,0 +1,19 @@
/* XPM */
static char * button_iconify_xpm[] = {
"12 12 4 1",
" c None",
". c #808080",
"+ c #585858",
"@ c #DCDCDC",
" ",
" ",
" ",
" ",
" .++++++++. ",
" +@@@@@@@@+ ",
" +@@@@@@@@+ ",
" .++++++++. ",
" ",
" ",
" ",
" "};

View file

@ -0,0 +1,22 @@
/* XPM */
static char * button_lower_xpm[] = {
"12 12 7 1",
" c None",
". c #585858",
"+ c #FFFFFF",
"@ c #808080",
"# c #C3C3C3",
"$ c #DCDCDC",
"% c #A0A0A0",
"@......@ ",
".++++++. ",
".++++++. ",
".++++++@ ",
".+++@......@",
".+++.$$#$$$.",
".+++.$$%$$$.",
"@..@.#%%$$$.",
" .$$$$$$.",
" .$$$$$$.",
" .$$$$$$.",
" @......@"};

View file

@ -0,0 +1,19 @@
/* XPM */
static char * button_max_xpm[] = {
"12 12 4 1",
" c None",
". c #DCDCDC",
"+ c #585858",
"@ c #808080",
" ",
" ",
" @++++++@ ",
" +......+ ",
" +......+ ",
" +......+ ",
" +......+ ",
" +......+ ",
" +......+ ",
" @++++++@ ",
" ",
" "};

View file

@ -0,0 +1,20 @@
/* XPM */
static char * button_unmax_xpm[] = {
"12 12 5 1",
" c None",
". c #808080",
"+ c #585858",
"@ c #C3C3C3",
"# c #DCDCDC",
".++++++++++.",
"+@########@+",
"+##########+",
"+##########+",
"+##########+",
"+##########+",
"+##########+",
"+##########+",
"+##########+",
"+##########+",
"+@########@+",
".++++++++++."};

View file

@ -1,22 +1,18 @@
/* XPM */ /* XPM */
static char * close_xpm[] = { static char * close_xpm[] = {
"12 12 7 1", "12 12 3 1",
" c None", " c None",
". c #DCDCDC", ". c #585858",
"+ c #585858", "+ c #DCDCDC",
"@ c #A0A0A0", " .. .. ",
"# c #FFFFFF", ".++. .++.",
"$ c #808080", ".+++. .+++.",
"% c #C3C3C3", " .+++..+++. ",
" ", " .++++++. ",
" +$. +@ ", " .++++. ",
".#+$. +@#.", " .++++. ",
" .#+$. +@#. ", " .++++++. ",
" .#+$+@#. ", " .+++..+++. ",
" ..@@#. ", ".+++. .+++.",
" +@@+. ", ".++. .++.",
" +@%#@+ ", " .. .. "};
" +@%..#@+ ",
" +@%. .#@+ ",
" @%. .#@ ",
" . . "};

View file

@ -24,7 +24,6 @@
#include <qlayout.h> #include <qlayout.h>
#include <qpixmap.h> #include <qpixmap.h>
#include <qpainter.h> #include <qpainter.h>
#include <qpushbutton.h>
// Local includes // Local includes
#include "../../options.h" #include "../../options.h"
@ -40,13 +39,13 @@
#include "resize_bar_left.xpm" #include "resize_bar_left.xpm"
#include "resize_bar_mid.xpm" #include "resize_bar_mid.xpm"
#include "resize_bar_right.xpm" #include "resize_bar_right.xpm"
#include "base_up.xpm" #include "button_base_up.xpm"
#include "base_down.xpm" #include "button_base_down.xpm"
#include "close.xpm" #include "button_close.xpm"
#include "unmax.xpm" #include "button_unmax.xpm"
#include "max.xpm" #include "button_max.xpm"
#include "lower.xpm" #include "button_lower.xpm"
#include "bar.xpm" #include "button_iconify.xpm"
#include <X11/Xlib.h> #include <X11/Xlib.h>
@ -54,17 +53,35 @@ extern "C"
{ {
Client * allocate(Workspace * workSpace, WId winId) Client * allocate(Workspace * workSpace, WId winId)
{ {
return new RiscOSClient(workSpace, winId); return new RiscOS::Manager(workSpace, winId);
} }
} }
RiscOSButton::RiscOSButton(RiscOSClient * parent) using namespace RiscOS;
: QButton(parent, "RiscOSButton"),
client_(parent) QPixmap * px_button_base_up = 0L;
QPixmap * px_button_base_down = 0L;
QPixmap * px_button_iconify = 0L;
QPixmap * px_button_close = 0L;
QPixmap * px_button_lower = 0L;
QPixmap * px_button_max = 0L;
QPixmap * px_button_unmax = 0L;
QPixmap * px_title_inactive_left = 0L;
QPixmap * px_title_inactive = 0L;
QPixmap * px_title_inactive_right = 0L;
QPixmap * px_title_active_left = 0L;
QPixmap * px_title_active = 0L;
QPixmap * px_title_active_right = 0L;
QPixmap * px_resize_left = 0L;
QPixmap * px_resize_mid = 0L;
QPixmap * px_resize_right = 0L;
Button::Button(Manager * parent)
: QButton(parent, "Button"),
client_(parent),
px_symbol_(0L)
{ {
setFixedSize(18, 18); setFixedSize(18, 18);
px_base_up_ = QPixmap(base_up_xpm);
px_base_down_ = QPixmap(base_down_xpm);
XSetWindowAttributes wsa; XSetWindowAttributes wsa;
wsa.save_under = true; wsa.save_under = true;
@ -72,63 +89,64 @@ RiscOSButton::RiscOSButton(RiscOSClient * parent)
} }
void void
RiscOSButton::drawButton(QPainter * p) Button::drawButton(QPainter * p)
{ {
if (isDown()) if (isDown())
p->drawPixmap(0, 0, px_base_down_); p->drawPixmap(0, 0, *px_button_base_down);
else else
p->drawPixmap(0, 0, px_base_up_); p->drawPixmap(0, 0, *px_button_base_up);
p->drawPixmap(3, 3, px_symbol_); if (px_symbol_ != 0)
p->drawPixmap(3, 3, *px_symbol_);
} }
void void
RiscOSButton::setSymbol(const QPixmap & p) Button::setSymbol(QPixmap * p)
{ {
px_symbol_ = p; px_symbol_ = p;
repaint(false); repaint(false);
} }
RiscOSLowerButton::RiscOSLowerButton(RiscOSClient * parent) LowerButton::LowerButton(Manager * parent)
: RiscOSButton(parent) : Button(parent)
{ {
// TODO connect(this, SIGNAL(clicked()), client(), (SLOT(lowerAndDeactivate()))); // TODO connect(this, SIGNAL(clicked()), client(), (SLOT(lowerAndDeactivate())));
setSymbol(QPixmap(lower_xpm)); setSymbol(px_button_lower);
} }
RiscOSCloseButton::RiscOSCloseButton(RiscOSClient * parent) CloseButton::CloseButton(Manager * parent)
: RiscOSButton(parent) : Button(parent)
{ {
connect(this, SIGNAL(clicked()), client(), (SLOT(closeWindow()))); connect(this, SIGNAL(clicked()), client(), (SLOT(closeWindow())));
setSymbol(QPixmap(close_xpm)); setSymbol(px_button_close);
} }
RiscOSIconifyButton::RiscOSIconifyButton(RiscOSClient * parent) IconifyButton::IconifyButton(Manager * parent)
: RiscOSButton(parent) : Button(parent)
{ {
connect(this, SIGNAL(clicked()), client(), (SLOT(iconify()))); connect(this, SIGNAL(clicked()), client(), (SLOT(iconify())));
setSymbol(QPixmap(bar_xpm)); setSymbol(px_button_iconify);
} }
RiscOSMaximiseButton::RiscOSMaximiseButton(RiscOSClient * parent) MaximiseButton::MaximiseButton(Manager * parent)
: RiscOSButton(parent) : Button(parent)
{ {
setSymbol(QPixmap(max_xpm)); setSymbol(px_button_unmax);
} }
void void
RiscOSMaximiseButton::setOn(bool on) MaximiseButton::setOn(bool on)
{ {
if (on) if (on)
setSymbol(QPixmap(unmax_xpm)); setSymbol(px_button_unmax);
else else
setSymbol(QPixmap(max_xpm)); setSymbol(px_button_max);
} }
void void
RiscOSMaximiseButton::mouseReleaseEvent(QMouseEvent * e) MaximiseButton::mouseReleaseEvent(QMouseEvent * e)
{ {
RiscOSButton::mouseReleaseEvent(e); Button::mouseReleaseEvent(e);
if (!rect().contains(e->pos())) if (!rect().contains(e->pos()))
return; return;
@ -150,77 +168,77 @@ RiscOSMaximiseButton::mouseReleaseEvent(QMouseEvent * e)
} }
} }
RiscOSResizeButton::RiscOSResizeButton(RiscOSClient * parent) ResizeButton::ResizeButton(Manager * parent)
: RiscOSButton(parent) : Button(parent)
{ {
} }
RiscOSTitleBar::RiscOSTitleBar(RiscOSClient * parent) TitleBar::TitleBar(Manager * parent)
: QWidget(parent, "RiscOSTitleBar"), : QWidget(parent, "TitleBar"),
client_(parent) client_(parent)
{ {
setFixedHeight(18); setFixedHeight(18);
px_inactive_left_ = QPixmap(title_inactive_left_xpm);
px_inactive_ = QPixmap(title_inactive_xpm);
px_inactive_right_ = QPixmap(title_inactive_right_xpm);
px_active_left_ = QPixmap(title_active_left_xpm);
px_active_ = QPixmap(title_active_xpm);
px_active_right_ = QPixmap(title_active_right_xpm);
XSetWindowAttributes wsa; XSetWindowAttributes wsa;
wsa.save_under = true; wsa.save_under = true;
XChangeWindowAttributes(qt_xdisplay(), winId(), 0, &wsa); XChangeWindowAttributes(qt_xdisplay(), winId(), 0, &wsa);
buf_.resize(128,18); buf_ = new QPixmap;
buf_->resize(128, 18);
_updatePixmap(); _updatePixmap();
} }
void TitleBar::~TitleBar()
RiscOSTitleBar::_updatePixmap()
{ {
if (size().width() > buf_.width()) delete buf_;
buf_.resize(size());
QPainter p;
p.begin(&buf_);
if (client_->isActive()) {
p.drawPixmap(0, 0, px_active_left_);
p.drawTiledPixmap(2, 0, width() - 4, 18, px_active_);
p.drawPixmap(width() - 2, 0, px_active_right_);
} else {
p.drawPixmap(0, 0, px_inactive_left_);
p.drawTiledPixmap(2, 0, width() - 4, 18, px_inactive_);
p.drawPixmap(width() - 2, 0, px_inactive_right_);
}
p.setPen(client_->colour());
p.setFont(client_->font());
p.setFont(QFont("times", 10, QFont::Bold));
p.drawText(3, 0, width() - 6, 18, AlignCenter, client_->caption());
} }
void void
RiscOSTitleBar::resizeEvent(QResizeEvent * e) TitleBar::_updatePixmap()
{
if (size().width() > buf_->width())
buf_->resize(size());
QPainter p;
p.begin(buf_);
if (client_->isActive()) {
p.drawPixmap(0, 0, *px_title_active_left);
p.drawTiledPixmap(2, 0, width() - 4, 18, *px_title_active);
p.drawPixmap(width() - 2, 0, *px_title_active_right);
p.setPen(Qt::white);
p.setFont(options->font());
p.drawText(3, 0, width() - 6, 18, AlignCenter, client_->caption());
} else {
p.drawPixmap(0, 0, *px_title_inactive_left);
p.drawTiledPixmap(2, 0, width() - 4, 18, *px_title_inactive);
p.drawPixmap(width() - 2, 0, *px_title_inactive_right);
p.setPen(Qt::black);
p.setFont(options->font());
p.drawText(3, 0, width() - 6, 18, AlignCenter, client_->caption());
}
}
void
TitleBar::resizeEvent(QResizeEvent * e)
{ {
QWidget::resizeEvent(e); QWidget::resizeEvent(e);
_updatePixmap(); _updatePixmap();
} }
void void
RiscOSTitleBar::paintEvent(QPaintEvent * e) TitleBar::paintEvent(QPaintEvent * e)
{ {
QRect r(e->rect()); QRect r(e->rect());
bitBlt(this, r.topLeft(), &buf_, r, Qt::CopyROP); bitBlt(this, r.topLeft(), buf_, r, Qt::CopyROP);
} }
void void
RiscOSTitleBar::mousePressEvent(QMouseEvent * e) TitleBar::mousePressEvent(QMouseEvent * e)
{ {
switch (e->button()) { switch (e->button()) {
@ -243,12 +261,12 @@ RiscOSTitleBar::mousePressEvent(QMouseEvent * e)
} }
void void
RiscOSTitleBar::mouseReleaseEvent(QMouseEvent * e) TitleBar::mouseReleaseEvent(QMouseEvent * e)
{ {
} }
void void
RiscOSTitleBar::mouseMoveEvent(QMouseEvent * e) TitleBar::mouseMoveEvent(QMouseEvent * e)
{ {
QPoint adjustedForCursor = e->globalPos() - clientPosToMousePos_; QPoint adjustedForCursor = e->globalPos() - clientPosToMousePos_;
@ -262,26 +280,26 @@ RiscOSTitleBar::mouseMoveEvent(QMouseEvent * e)
} }
void void
RiscOSTitleBar::mouseDoubleClickEvent(QMouseEvent * e) TitleBar::mouseDoubleClickEvent(QMouseEvent * e)
{ {
client_->setShade(!client_->isShade()); client_->setShade(!client_->isShade());
} }
void void
RiscOSTitleBar::update() TitleBar::update()
{ {
_updatePixmap(); _updatePixmap();
repaint(false); repaint(false);
} }
RiscOSResizeBar::RiscOSResizeBar(RiscOSClient * parent) ResizeBar::ResizeBar(Manager * parent)
: QWidget(parent, "RiscOSResizeBar") : QWidget(parent, "ResizeBar")
{ {
setFixedHeight(8); setFixedHeight(8);
left_ = new RiscOSResizeLeft(this, parent); left_ = new ResizeLeft(this, parent);
mid_ = new RiscOSResizeMid(this, parent); mid_ = new ResizeMid(this, parent);
right_ = new RiscOSResizeRight(this, parent); right_ = new ResizeRight(this, parent);
QHBoxLayout * layout = new QHBoxLayout(this); QHBoxLayout * layout = new QHBoxLayout(this);
@ -299,60 +317,63 @@ RiscOSResizeBar::RiscOSResizeBar(RiscOSClient * parent)
} }
void void
RiscOSResizeBar::update() ResizeBar::update()
{ {
mid_->update(); mid_->update();
} }
RiscOSResizeMid::RiscOSResizeMid(RiscOSResizeBar * parent, RiscOSClient * c) ResizeMid::ResizeMid(ResizeBar * parent, Manager * c)
: QWidget(parent, "RiscOSResizeMid"), : QWidget(parent, "ResizeMid"),
client_(c) client_(c)
{ {
setCursor(Qt::sizeVerCursor); setCursor(Qt::sizeVerCursor);
buf_ = new QPixmap;
buf_->resize(128, 8);
}
px_left_ = QPixmap(resize_bar_left_xpm); ResizeMid::~ResizeMid()
px_mid_ = QPixmap(resize_bar_mid_xpm); {
px_right_ = QPixmap(resize_bar_right_xpm); delete buf_;
} }
void void
RiscOSResizeMid::_updatePixmap() ResizeMid::_updatePixmap()
{ {
if (size().width() > buf_.width()) if (size().width() > buf_->width())
buf_.resize(size()); buf_->resize(size());
QPainter p; QPainter p;
p.begin(&buf_); p.begin(buf_);
p.drawLine(0, 8, width(), 8); p.drawLine(0, 8, width(), 8);
p.drawPixmap(0, 0, px_left_); p.drawPixmap(0, 0, *px_resize_left);
p.drawTiledPixmap(2, 0, width() - 4, 7, px_mid_); p.drawTiledPixmap(2, 0, width() - 4, 7, *px_resize_mid);
p.drawPixmap(width() - 2, 0, px_right_); p.drawPixmap(width() - 2, 0, *px_resize_right);
} }
void void
RiscOSResizeMid::update() ResizeMid::update()
{ {
_updatePixmap(); _updatePixmap();
repaint(false); repaint(false);
} }
void void
RiscOSResizeMid::resizeEvent(QResizeEvent * e) ResizeMid::resizeEvent(QResizeEvent * e)
{ {
QWidget::resizeEvent(e); QWidget::resizeEvent(e);
_updatePixmap(); _updatePixmap();
} }
void void
RiscOSResizeMid::paintEvent(QPaintEvent * e) ResizeMid::paintEvent(QPaintEvent * e)
{ {
QRect r(e->rect()); QRect r(e->rect());
bitBlt(this, r.topLeft(), &buf_, r, Qt::CopyROP); bitBlt(this, r.topLeft(), buf_, r, Qt::CopyROP);
} }
void void
RiscOSResizeMid::mouseMoveEvent(QMouseEvent * e) ResizeMid::mouseMoveEvent(QMouseEvent * e)
{ {
QRect g = client_->geometry(); QRect g = client_->geometry();
g.setBottom(e->globalPos().y()); g.setBottom(e->globalPos().y());
@ -365,8 +386,8 @@ RiscOSResizeMid::mouseMoveEvent(QMouseEvent * e)
} }
} }
RiscOSResizeLeft::RiscOSResizeLeft(RiscOSResizeBar * parent, RiscOSClient * c) ResizeLeft::ResizeLeft(ResizeBar * parent, Manager * c)
: QWidget(parent, "RiscOSResizeLeft"), : QWidget(parent, "ResizeLeft"),
client_(c) client_(c)
{ {
setCursor(Qt::sizeBDiagCursor); setCursor(Qt::sizeBDiagCursor);
@ -377,14 +398,14 @@ RiscOSResizeLeft::RiscOSResizeLeft(RiscOSResizeBar * parent, RiscOSClient * c)
pixmap.resize(30, 8); pixmap.resize(30, 8);
pixmap.fill(Qt::black); pixmap.fill(Qt::black);
QPainter p(&pixmap); QPainter p(&pixmap);
p.drawPixmap(1, 0, QPixmap(resize_bar_left_xpm)); p.drawPixmap(1, 0, *px_resize_left);
p.drawPixmap(3, 0, QPixmap(resize_bar_mid_xpm)); p.drawPixmap(3, 0, *px_resize_mid);
p.drawPixmap(28, 0, QPixmap(resize_bar_right_xpm)); p.drawPixmap(28, 0, *px_resize_right);
setBackgroundPixmap(pixmap); setBackgroundPixmap(pixmap);
} }
void void
RiscOSResizeLeft::mouseMoveEvent(QMouseEvent * e) ResizeLeft::mouseMoveEvent(QMouseEvent * e)
{ {
QRect g = client_->geometry(); QRect g = client_->geometry();
g.setBottom(e->globalPos().y()); g.setBottom(e->globalPos().y());
@ -399,8 +420,8 @@ RiscOSResizeLeft::mouseMoveEvent(QMouseEvent * e)
} }
} }
RiscOSResizeRight::RiscOSResizeRight(RiscOSResizeBar * parent, RiscOSClient * c) ResizeRight::ResizeRight(ResizeBar * parent, Manager * c)
: QWidget(parent, "RiscOSResizeRight"), : QWidget(parent, "ResizeRight"),
client_(c) client_(c)
{ {
setCursor(Qt::sizeFDiagCursor); setCursor(Qt::sizeFDiagCursor);
@ -411,14 +432,14 @@ RiscOSResizeRight::RiscOSResizeRight(RiscOSResizeBar * parent, RiscOSClient * c)
pixmap.resize(30, 8); pixmap.resize(30, 8);
pixmap.fill(Qt::black); pixmap.fill(Qt::black);
QPainter p(&pixmap); QPainter p(&pixmap);
p.drawPixmap(0, 0, QPixmap(resize_bar_left_xpm)); p.drawPixmap(0, 0, *px_resize_left);
p.drawPixmap(2, 0, QPixmap(resize_bar_mid_xpm)); p.drawPixmap(2, 0, *px_resize_mid);
p.drawPixmap(27, 0, QPixmap(resize_bar_right_xpm)); p.drawPixmap(27, 0, *px_resize_right);
setBackgroundPixmap(pixmap); setBackgroundPixmap(pixmap);
} }
void void
RiscOSResizeRight::mouseMoveEvent(QMouseEvent * e) ResizeRight::mouseMoveEvent(QMouseEvent * e)
{ {
QRect g = client_->geometry(); QRect g = client_->geometry();
g.setBottom(e->globalPos().y()); g.setBottom(e->globalPos().y());
@ -433,28 +454,28 @@ RiscOSResizeRight::mouseMoveEvent(QMouseEvent * e)
} }
} }
RiscOSClient::RiscOSClient( Manager::Manager(
Workspace * workSpace, Workspace * workSpace,
WId winId, WId winId,
QWidget * parent, QWidget * parent,
const char * name const char * name
) )
: Client(workSpace, winId, parent, name, WResizeNoErase) : Client(workSpace, winId, parent, name, WResizeNoErase),
pixmapsLoaded_(false)
{ {
setMouseTracking(false); // I don't want this ! setMouseTracking(false); // I don't want this !
setBackgroundColor(Qt::black); setBackgroundColor(Qt::black);
_loadPixmaps();
connect(options, SIGNAL(resetClients()), this, SLOT(slotReset())); connect(options, SIGNAL(resetClients()), this, SLOT(slotReset()));
lower_ = new RiscOSLowerButton(this); lower_ = new LowerButton (this);
close_ = new RiscOSCloseButton(this); close_ = new CloseButton (this);
title_ = new TitleBar (this);
title_ = new RiscOSTitleBar(this); iconify_ = new IconifyButton (this);
maximize_ = new MaximiseButton (this);
iconify_ = new RiscOSIconifyButton(this); resizeBar_ = new ResizeBar (this);
maximize_ = new RiscOSMaximiseButton(this);
resizeBar_ = new RiscOSResizeBar(this);
// Layout // Layout
@ -497,31 +518,31 @@ RiscOSClient::RiscOSClient(
} }
void void
RiscOSClient::slotReset() Manager::slotReset()
{ {
// Empty. // Empty.
} }
void void
RiscOSClient::captionChange(const QString &) Manager::captionChange(const QString &)
{ {
title_->update(); title_->update();
} }
void void
RiscOSClient::activeChange(bool b) Manager::activeChange(bool b)
{ {
title_->update(); title_->update();
} }
void void
RiscOSClient::maximizeChange(bool b) Manager::maximizeChange(bool b)
{ {
maximize_->setOn(b); maximize_->setOn(b);
} }
void void
RiscOSClient::maximizeAndRaise() Manager::maximizeAndRaise()
{ {
maximize(MaximizeFull); maximize(MaximizeFull);
workspace()->raiseClient(this); workspace()->raiseClient(this);
@ -529,7 +550,7 @@ RiscOSClient::maximizeAndRaise()
} }
void void
RiscOSClient::maximizeVertically() Manager::maximizeVertically()
{ {
maximize(MaximizeVertical); maximize(MaximizeVertical);
workspace()->raiseClient(this); workspace()->raiseClient(this);
@ -537,19 +558,19 @@ RiscOSClient::maximizeVertically()
} }
void void
RiscOSClient::maximizeNoRaise() Manager::maximizeNoRaise()
{ {
maximize(MaximizeFull); maximize(MaximizeFull);
} }
void void
RiscOSClient::resize(int w, int h) Manager::resize(int w, int h)
{ {
Client::resize(w, h); Client::resize(w, h);
} }
void void
RiscOSClient::setShade(bool b) Manager::setShade(bool b)
{ {
#if 0 #if 0
// Hmm. This does screwy things to the layout. // Hmm. This does screwy things to the layout.
@ -563,4 +584,47 @@ RiscOSClient::setShade(bool b)
// Client::setShade(b); // Client::setShade(b);
} }
void
Manager::_loadPixmaps()
{
if (pixmapsLoaded_) {
delete px_button_base_up; px_button_base_up = 0L;
delete px_button_base_down; px_button_base_down = 0L;
delete px_button_iconify; px_button_iconify = 0L;
delete px_button_close; px_button_close = 0L;
delete px_button_lower; px_button_lower = 0L;
delete px_button_max; px_button_max = 0L;
delete px_button_unmax; px_button_unmax = 0L;
delete px_title_inactive_left; px_title_inactive_left = 0L;
delete px_title_inactive; px_title_inactive = 0L;
delete px_title_inactive_right; px_title_inactive_right = 0L;
delete px_title_active_left; px_title_active_left = 0L;
delete px_title_active; px_title_active = 0L;
delete px_title_active_right; px_title_active_right = 0L;
delete px_resize_left; px_resize_left = 0L;
delete px_resize_mid; px_resize_mid = 0L;
delete px_resize_right; px_resize_right = 0L;
}
px_button_base_up = new QPixmap(button_base_up_xpm);
px_button_base_down = new QPixmap(button_base_down_xpm);
px_button_iconify = new QPixmap(button_iconify_xpm);
px_button_close = new QPixmap(button_close_xpm);
px_button_lower = new QPixmap(button_lower_xpm);
px_button_max = new QPixmap(button_max_xpm);
px_button_unmax = new QPixmap(button_unmax_xpm);
px_title_inactive_left = new QPixmap(title_inactive_left_xpm);
px_title_inactive = new QPixmap(title_inactive_xpm);
px_title_inactive_right = new QPixmap(title_inactive_right_xpm);
px_title_active_left = new QPixmap(title_active_left_xpm);
px_title_active = new QPixmap(title_active_xpm);
px_title_active_right = new QPixmap(title_active_right_xpm);
px_resize_left = new QPixmap(resize_bar_left_xpm);
px_resize_mid = new QPixmap(resize_bar_mid_xpm);
px_resize_right = new QPixmap(resize_bar_right_xpm);
pixmapsLoaded_ = true;
}
// vim:ts=2:sw=2:tw=78 // vim:ts=2:sw=2:tw=78

View file

@ -24,74 +24,101 @@
#define RISC_OS_CLIENT_H #define RISC_OS_CLIENT_H
#include <qbutton.h> #include <qbutton.h>
#include <qpixmap.h>
#include <qpoint.h> #include <qpoint.h>
#include "../../client.h" #include "../../client.h"
class RiscOSClient; class QPixmap;
class RiscOSButton : public QButton namespace RiscOS {
static QPixmap * px_button_base_up;
static QPixmap * px_button_base_down;
static QPixmap * px_button_iconify_;
static QPixmap * px_button_close_;
static QPixmap * px_button_lower_;
static QPixmap * px_button_max_;
static QPixmap * px_button_unmax_;
static QPixmap * px_title_inactive_left_;
static QPixmap * px_title_inactive_;
static QPixmap * px_title_inactive_right_;
static QPixmap * px_title_active_left_;
static QPixmap * px_title_active_;
static QPixmap * px_title_active_right_;
static QPixmap * px_resize_left_;
static QPixmap * px_resize_mid_;
static QPixmap * px_resize_right_;
// --------------------------------------------------------------------------
class Manager;
class Button : public QButton
{ {
Q_OBJECT Q_OBJECT
public: public:
RiscOSButton(RiscOSClient * parent); Button(Manager * parent);
protected: protected:
void drawButton(QPainter *); void drawButton(QPainter *);
void setSymbol(const QPixmap &); void setSymbol(QPixmap *);
protected: protected:
RiscOSClient * client() { return client_; } Manager * client() { return client_; }
private: private:
RiscOSClient * client_; Manager * client_;
QPixmap px_base_up_;
QPixmap px_base_down_;
QPixmap px_symbol_; QPixmap * px_symbol_;
}; };
class RiscOSLowerButton : public RiscOSButton // --------------------------------------------------------------------------
class LowerButton : public Button
{ {
Q_OBJECT Q_OBJECT
public: public:
RiscOSLowerButton(RiscOSClient * parent); LowerButton(Manager * parent);
}; };
class RiscOSCloseButton : public RiscOSButton // --------------------------------------------------------------------------
class CloseButton : public Button
{ {
Q_OBJECT Q_OBJECT
public: public:
RiscOSCloseButton(RiscOSClient * parent); CloseButton(Manager * parent);
}; };
class RiscOSIconifyButton : public RiscOSButton // --------------------------------------------------------------------------
class IconifyButton : public Button
{ {
Q_OBJECT Q_OBJECT
public: public:
RiscOSIconifyButton(RiscOSClient * parent); IconifyButton(Manager * parent);
}; };
class RiscOSMaximiseButton : public RiscOSButton // --------------------------------------------------------------------------
class MaximiseButton : public Button
{ {
Q_OBJECT Q_OBJECT
public: public:
RiscOSMaximiseButton(RiscOSClient * parent); MaximiseButton(Manager * parent);
void setOn(bool); void setOn(bool);
@ -100,22 +127,28 @@ class RiscOSMaximiseButton : public RiscOSButton
void mouseReleaseEvent(QMouseEvent *); void mouseReleaseEvent(QMouseEvent *);
}; };
class RiscOSResizeButton : public RiscOSButton // --------------------------------------------------------------------------
class ResizeButton : public Button
{ {
Q_OBJECT Q_OBJECT
public: public:
RiscOSResizeButton(RiscOSClient * parent); ResizeButton(Manager * parent);
}; };
class RiscOSTitleBar : public QWidget // --------------------------------------------------------------------------
class TitleBar : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
RiscOSTitleBar(RiscOSClient * parent); TitleBar(Manager * parent);
virtual ~TitleBar();
void update(); void update();
protected: protected:
@ -132,49 +165,27 @@ class RiscOSTitleBar : public QWidget
void _updatePixmap(); void _updatePixmap();
RiscOSClient * client_; Manager * client_;
QPixmap px_inactive_left_; QPixmap * buf_;
QPixmap px_inactive_;
QPixmap px_inactive_right_;
QPixmap px_active_left_;
QPixmap px_active_;
QPixmap px_active_right_;
QPixmap buf_;
bool active_; bool active_;
QPoint clientPosToMousePos_; QPoint clientPosToMousePos_;
}; };
class RiscOSResizeLeft; // --------------------------------------------------------------------------
class RiscOSResizeMid;
class RiscOSResizeRight;
class RiscOSResizeBar : public QWidget class ResizeBar;
class ResizeMid : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
RiscOSResizeBar(RiscOSClient * parent); ResizeMid(ResizeBar * parent, Manager * client);
void update(); virtual ~ResizeMid();
private:
RiscOSResizeLeft * left_;
RiscOSResizeMid * mid_;
RiscOSResizeRight * right_;
};
class RiscOSResizeMid : public QWidget
{
Q_OBJECT
public:
RiscOSResizeMid(RiscOSResizeBar * parent, RiscOSClient * client);
void update(); void update();
@ -186,24 +197,22 @@ class RiscOSResizeMid : public QWidget
private: private:
RiscOSClient * client_; Manager * client_;
void _updatePixmap(); void _updatePixmap();
QPixmap buf_; QPixmap * buf_;
QPixmap px_left_;
QPixmap px_mid_;
QPixmap px_right_;
}; };
class RiscOSResizeLeft : public QWidget // --------------------------------------------------------------------------
class ResizeLeft : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
RiscOSResizeLeft(RiscOSResizeBar * parent, RiscOSClient * client); ResizeLeft(ResizeBar * parent, Manager * client);
protected: protected:
@ -211,16 +220,18 @@ class RiscOSResizeLeft : public QWidget
private: private:
RiscOSClient * client_; Manager * client_;
}; };
class RiscOSResizeRight : public QWidget // --------------------------------------------------------------------------
class ResizeRight : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
RiscOSResizeRight(RiscOSResizeBar * parent, RiscOSClient * client); ResizeRight(ResizeBar * parent, Manager * client);
protected: protected:
@ -228,17 +239,37 @@ class RiscOSResizeRight : public QWidget
private: private:
RiscOSClient * client_; Manager * client_;
}; };
class RiscOSClient : public Client // --------------------------------------------------------------------------
class ResizeBar : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
RiscOSClient(Workspace *, WId, QWidget * parent = 0, const char * name = 0); ResizeBar(Manager * parent);
~RiscOSClient() {} void update();
private:
ResizeLeft * left_;
ResizeMid * mid_;
ResizeRight * right_;
};
// --------------------------------------------------------------------------
class Manager : public Client
{
Q_OBJECT
public:
Manager(Workspace *, WId, QWidget * parent = 0, const char * name = 0);
~Manager() {}
QColor colour() const { return options->color(Options::Font, isActive()); } QColor colour() const { return options->color(Options::Font, isActive()); }
QFont font() const { return options->font(isActive()); } QFont font() const { return options->font(isActive()); }
@ -264,16 +295,21 @@ class RiscOSClient : public Client
private: private:
RiscOSLowerButton * lower_; LowerButton * lower_;
RiscOSCloseButton * close_; CloseButton * close_;
RiscOSTitleBar * title_; TitleBar * title_;
RiscOSIconifyButton * iconify_; IconifyButton * iconify_;
RiscOSMaximiseButton * maximize_; MaximiseButton * maximize_;
RiscOSResizeBar * resizeBar_; ResizeBar * resizeBar_;
void _loadPixmaps();
bool pixmapsLoaded_;
}; };
} // End namespace `RiscOS'
#endif #endif
// vim:ts=2:sw=2:tw=78 // vim:ts=2:sw=2:tw=78

View file

@ -2,26 +2,26 @@
static char * title_active_xpm[] = { static char * title_active_xpm[] = {
"128 18 6 1", "128 18 6 1",
" c None", " c None",
". c #FFFFC0", ". c #DCDCDC",
"+ c #DCDCDC", "+ c #A0A0A0",
"@ c #FFFFFF", "@ c #808080",
"# c #585858", "# c #008080",
"$ c #A0A0A0", "$ c #585858",
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", "................................................................................................................................",
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++",
"++@.+.......++....+.+........+..++.+++@+.......++..+.++........@.....++.++.+..@.@...+..@.+.++.+.+..++.++.........+.....+..+++..+", "@@+#@#######@@####@#@########@##@@#@@@+@#######@@##@#@@########+#####@@#@@#@##+#+###@##+#@#@@#@#@##@@#@@#########@#####@##@@@##@",
"++...+...+.....++..........................+.....@..............@..........@.....+................@@@@...+......+.@....@+.....+.", "@@###@###@#####@@##########################@#####+##############+##########+#####@################++++###@######@#+####+@#####@#",
"+.@...+............+.+.+............................@....+.+.@...+.........@................@@...@..@...@......++.+....+....+.++", "@#+###@############@#@#@############################+####@#@#+###@#########+################++###+##+###+######@@#@####@####@#@@",
"++...+.............@......@.......+...+.++.+...............++.+......+.........@@...+...+.++...@........@........++...+++.+.+++.", "@@###@#############+######+#######@###@#@@#@###############@@#@######@#########++###@###@#@@###+########+########@@###@@@#@#@@@#",
"++....+............+...........+...++....++...@......+@..+........@@..@.+.......@.....+................+.+..+...++@.........+++.", "@@####@############@###########@###@@####@@###+######@+##@########++##+#@#######+#####@################@#@##@###@@+#########@@@#",
"+.+...+........@@...++..............+@..++.................+..+@+.@@.@....@++.@.+.+.++....+.@.@....@..+.........++...........++.", "@#@###@########++###@@##############@+##@@#################@##@+@#++#+####+@@#+#@#@#@@####@#+#+####+##@#########@@###########@@#",
"+...++.+....@..........@..++.....+++..++++...........+.....+...+...........+++++@+....+.+.........+.+.+....+.....++@++..+...+.+.", "@###@@#@####+##########+##@@#####@@@##@@@@###########@#####@###@###########@@@@@+@####@#@#########@#@#@####@#####@@+@@##@###@#@#",
".....++.++.+..@.@...+..@.+.++.+.+..++.++.........+.....+..+++..+++@.+.......++....+.+........+..++.+++@+.......++..+.++........@", "#####@@#@@#@##+#+###@##+#@#@@#@#@##@@#@@#########@#####@##@@@##@@@+#@#######@@####@#@########@##@@#@@@+@#######@@##@#@@########+",
"@..........@.....+................@@@@...+......+.@....@+.....+.++...+...+.....++..........................+.....@..............", "+##########+#####@################++++###@######@#+####+@#####@#@@###@###@#####@@##########################@#####+##############",
".+.........@................@@...@..@...@......++.+....+....+.+++.@...+............+.+.+............................@....+.+.@..", "#@#########+################++###+##+###+######@@#@####@####@#@@@#+###@############@#@#@############################+####@#@#+##",
".....+.........@@...+...+.++...@........@........++...+++.+.+++.++...+.............@......@.......+...+.++.+...............++.+.", "#####@#########++###@###@#@@###+########+########@@###@@@#@#@@@#@@###@#############+######+#######@###@#@@#@###############@@#@#",
"..@@..@.+.......@.....+................+.+..+...++@.........+++.++....+............+...........+...++....++...@......+@..+......", "##++##+#@#######+#####@################@#@##@###@@+#########@@@#@@####@############@###########@###@@####@@###+######@+##@######",
"+.@@.@....@++.@.+.+.++....+.@.@....@..+.........++...........++.+.+...+........@@...++..............+@..++.................+..+@", "@#++#+####+@@#+#@#@#@@####@#+#+####+##@#########@@###########@@#@#@###@########++###@@##############@+##@@#################@##@+",
"...........+++++@+....+.+.........+.+.+....+.....++@++..+...+.+.+...++.+....@..........@..++.....+++..++++...........+.....+...+", "###########@@@@@+@####@#@#########@#@#@####@#####@@+@@##@###@#@#@###@@#@####+##########+##@@#####@@@##@@@@###########@#####@###@",
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
"################################################################################################################################"}; "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"};

View file

@ -1,26 +1,27 @@
/* XPM */ /* XPM */
static char * title_active_left_xpm[] = { static char * title_active_left_xpm[] = {
"2 18 5 1", "2 18 6 1",
" c None", " c None",
". c #FFFFFF", ". c #FFFFFF",
"+ c #DCDCDC", "+ c #DCDCDC",
"@ c #FFFFC0", "@ c #C3C3C3",
"# c #A0A0A0", "# c #A0A0A0",
"..", "$ c #808080",
".+", ".+",
".+", "+@",
".+", "+#",
".+", "+#",
".+", "+#",
".+", "+#",
".+", "+#",
".+", "+#",
".+", "+#",
".+", "+#",
".+", "+#",
".+", "+#",
".+", "+#",
".+", "+#",
".+", "+#",
".@", "+#",
"@#"}; "+#",
"@$"};

View file

@ -1,27 +1,28 @@
/* XPM */ /* XPM */
static char * title_active_right_xpm[] = { static char * title_active_right_xpm[] = {
"2 18 6 1", "2 18 7 1",
" c None", " c None",
". c #585858", ". c #DCDCDC",
"+ c #C0C000", "+ c #C3C3C3",
"@ c #FFFFC0", "@ c #A0A0A0",
"# c #A0A0A0", "# c #808080",
"$ c #FFFFFF", "$ c #585858",
"$@", "% c #000000",
".+",
"@#", "@#",
"+.", "#$",
"+.", "#$",
"+.", "#$",
"+.", "#$",
"+.", "#$",
"+.", "#$",
"+.", "#$",
"+.", "#$",
"+.", "#$",
"+.", "#$",
"+.", "#$",
"+.", "#$",
"+.", "#$",
"+.", "#$",
"+.", "#$",
".."}; "$%"};

View file

@ -2,26 +2,26 @@
static char * title_inactive_xpm[] = { static char * title_inactive_xpm[] = {
"128 18 6 1", "128 18 6 1",
" c None", " c None",
". c #C3C3C3", ". c #FFFFFF",
"+ c #DCDCDC", "+ c #DCDCDC",
"@ c #FFFFFF", "@ c #A0A0A0",
"# c #585858", "# c #C3C3C3",
"$ c #A0A0A0", "$ c #585858",
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", "................................................................................................................................",
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++",
"++@.+.......++....+.+........+..++.+++@+.......++..+.++........@.....++.++.+..@.@...+..@.+.++.+.+..++.++.........+.....+..+++..+", "++@#+#######++####+#+########+##++#+++@+#######++##+#++########@#####++#++#+##@#@###+##@#+#++#+#+##++#++#########+#####+##+++##+",
"++...+...+.....++..........................+.....@..............@..........@.....+................@@@@...+......+.@....@+.....+.", "++###+###+#####++##########################+#####@##############@##########@#####+################@@@@###+######+#@####@+#####+#",
"+.@...+............+.+.+............................@....+.+.@...+.........@................@@...@..@...@......++.+....+....+.++", "+#@###+############+#+#+############################@####+#+#@###+#########@################@@###@##@###@######++#+####+####+#++",
"++...+.............@......@.......+...+.++.+...............++.+......+.........@@...+...+.++...@........@........++...+++.+.+++.", "++###+#############@######@#######+###+#++#+###############++#+######+#########@@###+###+#++###@########@########++###+++#+#+++#",
"++....+............+...........+...++....++...@......+@..+........@@..@.+.......@.....+................+.+..+...++@.........+++.", "++####+############+###########+###++####++###@######+@##+########@@##@#+#######@#####+################+#+##+###++@#########+++#",
"+.+...+........@@...++..............+@..++.................+..+@+.@@.@....@++.@.+.+.++....+.@.@....@..+.........++...........++.", "+#+###+########@@###++##############+@##++#################+##+@+#@@#@####@++#@#+#+#++####+#@#@####@##+#########++###########++#",
"+...++.+....@..........@..++.....+++..++++...........+.....+...+...........+++++@+....+.+.........+.+.+....+.....++@++..+...+.+.", "+###++#+####@##########@##++#####+++##++++###########+#####+###+###########+++++@+####+#+#########+#+#+####+#####++@++##+###+#+#",
".....++.++.+..@.@...+..@.+.++.+.+..++.++.........+.....+..+++..+++@.+.......++....+.+........+..++.+++@+.......++..+.++........@", "#####++#++#+##@#@###+##@#+#++#+#+##++#++#########+#####+##+++##+++@#+#######++####+#+########+##++#+++@+#######++##+#++########@",
"@..........@.....+................@@@@...+......+.@....@+.....+.++...+...+.....++..........................+.....@..............", "@##########@#####+################@@@@###+######+#@####@+#####+#++###+###+#####++##########################+#####@##############",
".+.........@................@@...@..@...@......++.+....+....+.+++.@...+............+.+.+............................@....+.+.@..", "#+#########@################@@###@##@###@######++#+####+####+#+++#@###+############+#+#+############################@####+#+#@##",
".....+.........@@...+...+.++...@........@........++...+++.+.+++.++...+.............@......@.......+...+.++.+...............++.+.", "#####+#########@@###+###+#++###@########@########++###+++#+#+++#++###+#############@######@#######+###+#++#+###############++#+#",
"..@@..@.+.......@.....+................+.+..+...++@.........+++.++....+............+...........+...++....++...@......+@..+......", "##@@##@#+#######@#####+################+#+##+###++@#########+++#++####+############+###########+###++####++###@######+@##+######",
"+.@@.@....@++.@.+.+.++....+.@.@....@..+.........++...........++.+.+...+........@@...++..............+@..++.................+..+@", "+#@@#@####@++#@#+#+#++####+#@#@####@##+#########++###########++#+#+###+########@@###++##############+@##++#################+##+@",
"...........+++++@+....+.+.........+.+.+....+.....++@++..+...+.+.+...++.+....@..........@..++.....+++..++++...........+.....+...+", "###########+++++@+####+#+#########+#+#+####+#####++@++##+###+#+#+###++#+####@##########@##++#####+++##++++###########+#####+###+",
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
"################################################################################################################################"}; "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"};

View file

@ -2,19 +2,19 @@
static char * unmax_xpm[] = { static char * unmax_xpm[] = {
"12 12 5 1", "12 12 5 1",
" c None", " c None",
". c #FFFFFF", ". c #808080",
"+ c #585858", "+ c #585858",
"@ c #808080", "@ c #C3C3C3",
"# c #DCDCDC", "# c #DCDCDC",
"@++++++++++@", ".++++++++++.",
"+#........#+", "+@########@+",
"+..........+", "+##########+",
"+..........+", "+##########+",
"+..........+", "+##########+",
"+..........+", "+##########+",
"+..........+", "+##########+",
"+..........+", "+##########+",
"+..........+", "+##########+",
"+..........+", "+##########+",
"+#........#+", "+@########@+",
"@++++++++++@"}; ".++++++++++."};