()
| 176 | } |
| 177 | |
| 178 | public void init() { |
| 179 | dscale = Prefs.getGuiScale(); |
| 180 | scale = (int)Math.round(dscale); |
| 181 | if ((dscale>=1.5&&dscale<2.0) || (dscale>=2.5&&dscale<3.0)) |
| 182 | dscale = scale; |
| 183 | if (dscale>1.0) { |
| 184 | buttonWidth = (int)((BUTTON_WIDTH-2)*dscale); |
| 185 | buttonHeight = (int)((BUTTON_HEIGHT-2)*dscale); |
| 186 | offset = (int)Math.round((OFFSET-1)*dscale); |
| 187 | } else { |
| 188 | buttonWidth = BUTTON_WIDTH; |
| 189 | buttonHeight = BUTTON_HEIGHT; |
| 190 | offset = OFFSET; |
| 191 | } |
| 192 | gapSize = GAP_SIZE; |
| 193 | ps = new Dimension(buttonWidth*NUM_BUTTONS-(buttonWidth-gapSize), buttonHeight); |
| 194 | } |
| 195 | |
| 196 | void addPopupMenus() { |
| 197 | rectPopup = newPopupMenu(); |
no test coverage detected