Lines 119-128
Link Here
|
119 |
browser->value(1); |
119 |
browser->value(1); |
120 |
|
120 |
|
121 |
/* Create buttons */ |
121 |
/* Create buttons */ |
122 |
int left, right; |
122 |
int left, right, button_width; |
|
|
123 |
button_width = BUTTON_WIDTH + X_MARGIN; |
123 |
|
124 |
|
124 |
left = X_MARGIN; |
125 |
left = X_MARGIN; |
125 |
right = win->w() - BUTTON_WIDTH - X_MARGIN; |
126 |
right = win->w() - button_width - X_MARGIN; |
126 |
|
127 |
|
127 |
button_widgets.clear(); |
128 |
button_widgets.clear(); |
128 |
for (unsigned int i = 0; i < buttons.size(); i++) { |
129 |
for (unsigned int i = 0; i < buttons.size(); i++) { |
Lines 134-143
Link Here
|
134 |
x = right; |
135 |
x = right; |
135 |
|
136 |
|
136 |
if (buttons[i].returnbutton) |
137 |
if (buttons[i].returnbutton) |
137 |
button = new Fl_Return_Button(x, y, BUTTON_WIDTH, BUTTON_HEIGHT, |
138 |
button = new Fl_Return_Button(x, y, button_width, BUTTON_HEIGHT, |
138 |
buttons[i].text.c_str()); |
139 |
buttons[i].text.c_str()); |
139 |
else |
140 |
else |
140 |
button = new Fl_Button(x, y, BUTTON_WIDTH, BUTTON_HEIGHT, |
141 |
button = new Fl_Button(x, y, button_width, BUTTON_HEIGHT, |
141 |
buttons[i].text.c_str()); |
142 |
buttons[i].text.c_str()); |
142 |
|
143 |
|
143 |
window_int * wb = new window_int(this, i); |
144 |
window_int * wb = new window_int(this, i); |
Lines 149-157
Link Here
|
149 |
button_widgets.insert(button_widgets.end(), button); |
150 |
button_widgets.insert(button_widgets.end(), button); |
150 |
|
151 |
|
151 |
if (buttons[i].align_left) |
152 |
if (buttons[i].align_left) |
152 |
left += BUTTON_WIDTH + X_MARGIN; |
153 |
left += button_width + X_MARGIN; |
153 |
else |
154 |
else |
154 |
right -= BUTTON_WIDTH + X_MARGIN; |
155 |
right -= button_width + X_MARGIN; |
155 |
} |
156 |
} |
156 |
|
157 |
|
157 |
// Enable/disable buttons |
158 |
// Enable/disable buttons |