diff --git a/src/wmabout.cc b/src/wmabout.cc index d531ad576..2a677fd09 100644 --- a/src/wmabout.cc +++ b/src/wmabout.cc @@ -25,13 +25,18 @@ AboutDlg::AboutDlg(YActionListener* al): fListener(al) { const char version[] = "IceWM " VERSION " (" HOSTOS "/" HOSTCPU ")"; - mstring copyright = mstring("Copyright ") - + _("(C)") + " 1997-2012 Marko Macek, " - + _("(C)") + " 2001 Mathias Hasselmann"; + mstring copyhead = mstring("Copyright\t"); + mstring copysymb = mstring(_("(C)")); + mstring copyright = copyhead + + copysymb + " 1997-2012 Marko Macek, " + + copysymb + " 2001 Mathias Hasselmann, \n\t" + + copysymb + " 2016-2023 Bert Gijsbers. \n"; Ladder* ladder = new Ladder(); *ladder += label(version); - *ladder += label(copyright); + YLabel* copylabel = label(copyright); + copylabel->multiline(true); + *ladder += copylabel; *ladder += new Spacer(1, 20); Table* table = new Table(); diff --git a/src/ylabel.cc b/src/ylabel.cc index 1d9428361..be026f3f3 100644 --- a/src/ylabel.cc +++ b/src/ylabel.cc @@ -18,6 +18,7 @@ int YLabel::labelObjectCount; YLabel::YLabel(const mstring &label, YWindow *parent): YWindow(parent), fLabel(label), + fMultied(false), fPainted(false) { setParentRelative(); @@ -74,9 +75,13 @@ void YLabel::paint(Graphics &g, const YRect &/*r*/) { g.setColor(labelFg); g.setFont(labelFont); - for (s = fLabel; s.splitall('\n', &s, &r); s = r) { - g.drawChars(s, x, y); - y += h; + if (fMultied) { + g.drawStringMultiline(fLabel, x, y, width()); + } else { + for (s = fLabel; s.splitall('\n', &s, &r); s = r) { + g.drawChars(s, x, y); + y += h; + } } } } diff --git a/src/ylabel.h b/src/ylabel.h index 1774de5a2..3cb3157a3 100644 --- a/src/ylabel.h +++ b/src/ylabel.h @@ -14,9 +14,11 @@ class YLabel: public YWindow { virtual void repaint(); void setText(const char* label); + void multiline(bool enable) { fMultied = enable; } private: mstring fLabel; + bool fMultied; bool fPainted; void autoSize();