make the styles' doJustify methods stop returning the string length as this is no longer needed with the BFont class
This commit is contained in:
parent
de868d58dd
commit
be2f47223c
4 changed files with 12 additions and 16 deletions
|
@ -442,7 +442,7 @@ void Basemenu::move(int x, int y) {
|
|||
void Basemenu::redrawTitle(void) {
|
||||
const char *text = (! menu.label.empty()) ? getLabel() :
|
||||
i18n(BasemenuSet, BasemenuBlackboxMenu, "Blackbox Menu");
|
||||
int dx = menu.bevel_w, len = strlen(text);
|
||||
int dx = menu.bevel_w;
|
||||
unsigned int l;
|
||||
MenuStyle *style = screen->getMenuStyle();
|
||||
|
||||
|
@ -544,7 +544,7 @@ void Basemenu::drawItem(int index, bool highlight, bool clear,
|
|||
int sbl = index / menu.persub, i = index - (sbl * menu.persub);
|
||||
int item_x = (sbl * menu.item_w), item_y = (i * menu.item_h);
|
||||
int hilite_x = item_x, hilite_y = item_y, hoff_x = 0, hoff_y = 0;
|
||||
int text_x = 0, text_y = 0, len = strlen(text), sel_x = 0, sel_y = 0;
|
||||
int text_x = 0, text_y = 0, sel_x = 0, sel_y = 0;
|
||||
unsigned int hilite_w = menu.item_w, hilite_h = menu.item_h, text_w = 0,
|
||||
text_h = 0;
|
||||
unsigned int half_w = menu.item_h / 2, quarter_w = menu.item_h / 4;
|
||||
|
|
|
@ -71,7 +71,7 @@ struct WindowStyle {
|
|||
|
||||
TextJustify justify;
|
||||
|
||||
int doJustify(const std::string &text, int &start_pos,
|
||||
void doJustify(const std::string &text, int &start_pos,
|
||||
unsigned int max_length, unsigned int modifier) const;
|
||||
};
|
||||
|
||||
|
@ -83,7 +83,7 @@ struct ToolbarStyle {
|
|||
|
||||
TextJustify justify;
|
||||
|
||||
int doJustify(const std::string &text, int &start_pos,
|
||||
void doJustify(const std::string &text, int &start_pos,
|
||||
unsigned int max_length, unsigned int modifier) const;
|
||||
};
|
||||
|
||||
|
|
|
@ -1172,7 +1172,7 @@ void Toolbarmenu::Placementmenu::itemSelected(int button, unsigned int index) {
|
|||
}
|
||||
|
||||
|
||||
int ToolbarStyle::doJustify(const std::string &text, int &start_pos,
|
||||
void ToolbarStyle::doJustify(const std::string &text, int &start_pos,
|
||||
unsigned int max_length,
|
||||
unsigned int modifier) const {
|
||||
size_t text_len = text.size();
|
||||
|
@ -1195,6 +1195,4 @@ int ToolbarStyle::doJustify(const std::string &text, int &start_pos,
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return text_len;
|
||||
}
|
||||
|
|
|
@ -3542,7 +3542,7 @@ void BlackboxWindow::constrain(Corner anchor, int *pw, int *ph) {
|
|||
}
|
||||
|
||||
|
||||
int WindowStyle::doJustify(const std::string &text, int &start_pos,
|
||||
void WindowStyle::doJustify(const std::string &text, int &start_pos,
|
||||
unsigned int max_length,
|
||||
unsigned int modifier) const {
|
||||
size_t text_len = text.size();
|
||||
|
@ -3565,8 +3565,6 @@ int WindowStyle::doJustify(const std::string &text, int &start_pos,
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return text_len;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue