fixed Widget::draw for bordered items to adjust _h; removed unused label param from SliderWidget constructor; cleanup

svn-id: r11041
This commit is contained in:
Max Horn 2003-11-01 22:21:18 +00:00
parent 2d7eef223e
commit 72699c3d2b
3 changed files with 31 additions and 27 deletions

View file

@ -51,6 +51,7 @@ void Widget::draw() {
_x += 4;
_y += 4;
_w -= 8;
_h -= 8;
}
// Now perform the actual widget draw
@ -61,6 +62,7 @@ void Widget::draw() {
_x -= 4;
_y -= 4;
_w += 8;
_h += 8;
}
// Flag the draw area as dirty
@ -171,8 +173,8 @@ void CheckboxWidget::drawWidget(bool hilite) {
#pragma mark -
SliderWidget::SliderWidget(Dialog *boss, int x, int y, int w, int h, const String &label, uint32 cmd, uint8 hotkey)
: ButtonWidget(boss, x, y, w, h, label, cmd, hotkey),
SliderWidget::SliderWidget(Dialog *boss, int x, int y, int w, int h, uint32 cmd, uint8 hotkey)
: ButtonWidget(boss, x, y, w, h, "", cmd, hotkey),
_value(0), _oldValue(0),_valueMin(0), _valueMax(100), _isDragging(false) {
_flags = WIDGET_ENABLED | WIDGET_TRACK_MOUSE | WIDGET_CLEARBG;
_type = kSliderWidget;