Added 6th button in Mouse GUI
- Correct button size of 4 and 5 buttons in Mouse GUI. - Button number are in squence now, added the default values. Change-Id: I915077d11f9212c47c782fd9296b9f5b8909ed09 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2509 Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This commit is contained in:
parent
398b7899e8
commit
abbd654ba9
|
@ -206,6 +206,7 @@ MouseSettings::Defaults()
|
|||
map.button[2] = B_TERTIARY_MOUSE_BUTTON;
|
||||
map.button[3] = B_MOUSE_BUTTON(4);
|
||||
map.button[4] = B_MOUSE_BUTTON(5);
|
||||
map.button[5] = B_MOUSE_BUTTON(6);
|
||||
SetMapping(map);
|
||||
}
|
||||
}
|
||||
|
@ -226,7 +227,8 @@ MouseSettings::IsDefaultable()
|
|||
|| fSettings.map.button[1] != B_SECONDARY_MOUSE_BUTTON
|
||||
|| fSettings.map.button[2] != B_TERTIARY_MOUSE_BUTTON
|
||||
|| fSettings.map.button[3] != B_MOUSE_BUTTON(4)
|
||||
|| fSettings.map.button[4] != B_MOUSE_BUTTON(5);
|
||||
|| fSettings.map.button[4] != B_MOUSE_BUTTON(5)
|
||||
|| fSettings.map.button[5] != B_MOUSE_BUTTON(6);
|
||||
}
|
||||
|
||||
|
||||
|
@ -261,7 +263,8 @@ MouseSettings::IsRevertable()
|
|||
|| fSettings.map.button[1] != fOriginalSettings.map.button[1]
|
||||
|| fSettings.map.button[2] != fOriginalSettings.map.button[2]
|
||||
|| fSettings.map.button[3] != fOriginalSettings.map.button[3]
|
||||
|| fSettings.map.button[4] != fOriginalSettings.map.button[4];
|
||||
|| fSettings.map.button[4] != fOriginalSettings.map.button[4]
|
||||
|| fSettings.map.button[5] != fOriginalSettings.map.button[5];
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -36,12 +36,13 @@ static const int32 kMouseDownWidth = 72;
|
|||
static const int32 kMouseDownHeight = 35;
|
||||
|
||||
#define W kMouseDownWidth / 100
|
||||
static const int32 kButtonOffsets[][6] = {
|
||||
static const int32 kButtonOffsets[][7] = {
|
||||
{ 0, 100 * W },
|
||||
{ 0, 50 * W, 100 * W },
|
||||
{ 0, 35 * W, 65 * W, 100 * W },
|
||||
{ 0, 27 * W, 54 * W, 81 * W, 100 * W },
|
||||
{ 0, 23 * W, 46 * W, 69 * W, 84 * W, 100 * W }
|
||||
{ 0, 25 * W, 50 * W, 75 * W, 100 * W },
|
||||
{ 0, 20 * W, 40 * W, 60 * W, 80 * W, 100 * W },
|
||||
{ 0, 19 * W, 34 * W, 50 * W, 66 * W, 82 * W, 100 * W }
|
||||
};
|
||||
#undef W
|
||||
|
||||
|
@ -191,7 +192,7 @@ MouseView::MouseDown(BPoint where)
|
|||
BMessage message(kMsgMouseMap);
|
||||
message.AddInt32("button", button);
|
||||
|
||||
for (int i = 1; i < 6; i++) {
|
||||
for (int i = 1; i < 7; i++) {
|
||||
char tmp[2];
|
||||
sprintf(tmp, "%d", i);
|
||||
menu.AddItem(new BMenuItem(tmp, new BMessage(message)));
|
||||
|
|
|
@ -79,6 +79,7 @@ SettingsView::SettingsView(MouseSettings& settings)
|
|||
fTypeMenu->AddOption(B_TRANSLATE("3-Button"), 3);
|
||||
fTypeMenu->AddOption(B_TRANSLATE("4-Button"), 4);
|
||||
fTypeMenu->AddOption(B_TRANSLATE("5-Button"), 5);
|
||||
fTypeMenu->AddOption(B_TRANSLATE("6-Button"), 6);
|
||||
|
||||
// Create the "Double-click speed slider...
|
||||
fClickSpeedSlider = new BSlider("double_click_speed",
|
||||
|
|
Loading…
Reference in New Issue