add OtkFocusLabel
This commit is contained in:
parent
804b8cc6e5
commit
6b977b2ded
3 changed files with 6 additions and 34 deletions
|
@ -4,11 +4,12 @@ INCLUDES= -I../src
|
|||
|
||||
noinst_LIBRARIES=libotk.a
|
||||
|
||||
libotk_a_SOURCES= color.cc display.cc font.cc gccache.cc image.cc property.cc \
|
||||
imagecontrol.cc rect.cc screeninfo.cc texture.cc timer.cc \
|
||||
timerqueuemanager.cc style.cc configuration.cc util.cc \
|
||||
widget.cc focuswidget.cc button.cc eventhandler.cc \
|
||||
eventdispatcher.cc application.cc
|
||||
libotk_a_SOURCES= color.cc display.cc font.cc gccache.cc image.cc \
|
||||
property.cc imagecontrol.cc rect.cc screeninfo.cc \
|
||||
texture.cc timer.cc timerqueuemanager.cc style.cc \
|
||||
configuration.cc util.cc widget.cc focuswidget.cc \
|
||||
button.cc eventhandler.cc eventdispatcher.cc \
|
||||
focuslabel.cc application.cc
|
||||
|
||||
MAINTAINERCLEANFILES= Makefile.in
|
||||
|
||||
|
|
26
otk/style.cc
26
otk/style.cc
|
@ -156,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();
|
||||
|
|
|
@ -65,9 +65,6 @@ public:
|
|||
Style(BImageControl *);
|
||||
~Style();
|
||||
|
||||
void doJustify(const std::string &text, int &start_pos,
|
||||
unsigned int max_length, unsigned int modifier) const;
|
||||
|
||||
void readDatabaseMask(const std::string &rname,
|
||||
PixmapMask &pixmapMask,
|
||||
const Configuration &style);
|
||||
|
|
Loading…
Reference in a new issue