X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Fstyle.cc;h=277924d6d9b4e63d90f94c3af57b67d95efde838;hb=12a95bfdb31595ec53d72adef4e0fd6bf1ccf218;hp=6349a6bcf4a23694222f3663e0794b14b37765b6;hpb=fb0dd6cf9a839f9990ac877bf1b3d469d883b463;p=chaz%2Fopenbox diff --git a/otk/style.cc b/otk/style.cc index 6349a6bc..277924d6 100644 --- a/otk/style.cc +++ b/otk/style.cc @@ -3,8 +3,9 @@ #endif // HAVE_CONFIG_H #include -#include "display.hh" +#include +#include "display.hh" #include "util.hh" #include "style.hh" @@ -155,32 +156,6 @@ void Style::load(const Configuration &style) { } -void Style::doJustify(const std::string &text, int &start_pos, - unsigned int max_length, - unsigned int modifier) const { - size_t text_len = text.size(); - unsigned int length; - - do { - length = font->measureString(std::string(text, 0, text_len)) + modifier; - } while (length > max_length && text_len-- > 0); - - switch (justify) { - case RightJustify: - start_pos += max_length - length; - break; - - case CenterJustify: - start_pos += (max_length - length) / 2; - break; - - case LeftJustify: - default: - break; - } -} - - void Style::readDatabaseMask(const std::string &rname, PixmapMask &pixmapMask, const Configuration &style) { Window root_window = OBDisplay::screenInfo(screen_number)->getRootWindow(); @@ -256,7 +231,7 @@ BColor Style::readDatabaseColor(const std::string &rname, BFont *Style::readDatabaseFont(const std::string &rbasename, - const Configuration &style) { + const Configuration &style) { std::string fontname; std::string s;