Some more code style corrections of Keymap.
This commit is contained in:
parent
7727da7d3d
commit
f6c5dbf81c
@ -99,7 +99,7 @@ KeyboardLayout::DefaultKeySize()
|
||||
int32
|
||||
KeyboardLayout::IndexForModifier(int32 modifier)
|
||||
{
|
||||
switch(modifier) {
|
||||
switch (modifier) {
|
||||
case B_CAPS_LOCK:
|
||||
return 58;
|
||||
case B_NUM_LOCK:
|
||||
|
@ -659,12 +659,12 @@ KeyboardLayoutView::_DrawKey(BView* view, BRect updateRect, const Key* key,
|
||||
0.0f, 0.0f, 4.0f, 4.0f, base, background,
|
||||
pressed ? BControlLook::B_ACTIVATED : 0,
|
||||
BControlLook::B_LEFT_BORDER | BControlLook::B_RIGHT_BORDER
|
||||
| BControlLook::B_BOTTOM_BORDER);
|
||||
| BControlLook::B_BOTTOM_BORDER);
|
||||
be_control_look->DrawButtonBackground(view, bottomRight, updateRect,
|
||||
0.0f, 0.0f, 4.0f, 4.0f, base,
|
||||
pressed ? BControlLook::B_ACTIVATED : 0,
|
||||
BControlLook::B_LEFT_BORDER | BControlLook::B_RIGHT_BORDER
|
||||
| BControlLook::B_BOTTOM_BORDER);
|
||||
| BControlLook::B_BOTTOM_BORDER);
|
||||
|
||||
// clip out the bottom left corner
|
||||
bottomLeft.right += 1;
|
||||
@ -1073,10 +1073,10 @@ BRect
|
||||
KeyboardLayoutView::_FrameFor(BRect keyFrame)
|
||||
{
|
||||
BRect rect;
|
||||
rect.left = ceilf(keyFrame.left * fFactor);
|
||||
rect.top = ceilf(keyFrame.top * fFactor);
|
||||
rect.right = floorf((keyFrame.Width()) * fFactor + rect.left - fGap - 1);
|
||||
rect.bottom = floorf((keyFrame.Height()) * fFactor + rect.top - fGap - 1);
|
||||
rect.left = ceilf(keyFrame.left * fFactor);
|
||||
rect.top = ceilf(keyFrame.top * fFactor);
|
||||
rect.right = floorf((keyFrame.Width()) * fFactor + rect.left - fGap - 1);
|
||||
rect.bottom = floorf((keyFrame.Height()) * fFactor + rect.top - fGap - 1);
|
||||
rect.OffsetBy(fOffset);
|
||||
|
||||
return rect;
|
||||
|
@ -28,7 +28,7 @@ static const uint32 kModifierKeys = B_SHIFT_KEY | B_CAPS_LOCK | B_CONTROL_KEY
|
||||
|
||||
|
||||
static void
|
||||
print_key(char *chars, int32 offset, bool last = false)
|
||||
print_key(char* chars, int32 offset, bool last = false)
|
||||
{
|
||||
int size = chars[offset++];
|
||||
|
||||
@ -46,7 +46,7 @@ print_key(char *chars, int32 offset, bool last = false)
|
||||
default:
|
||||
{
|
||||
// 2-, 3-, or 4-byte UTF-8 character
|
||||
char *str = new char[size + 1];
|
||||
char* str = new char[size + 1];
|
||||
strncpy(str, &chars[offset], size);
|
||||
str[size] = 0;
|
||||
fputs(str, stdout);
|
||||
|
@ -466,8 +466,8 @@ KeymapWindow::_CreateMenu()
|
||||
|
||||
for (int32 i = 0; i < numFamilies; i++) {
|
||||
if (get_font_family(i, &family, &flags) == B_OK) {
|
||||
BMenuItem* item =
|
||||
new BMenuItem(family, new BMessage(kMsgMenuFontChanged));
|
||||
BMenuItem* item
|
||||
= new BMenuItem(family, new BMessage(kMsgMenuFontChanged));
|
||||
fFontMenu->AddItem(item);
|
||||
|
||||
if (!strcmp(family, currentFamily))
|
||||
|
@ -63,7 +63,7 @@ protected:
|
||||
|
||||
status_t _GetCurrentKeymap(entry_ref& ref);
|
||||
BString _GetActiveKeymapName();
|
||||
bool _SelectCurrentMap(BListView *list);
|
||||
bool _SelectCurrentMap(BListView* list);
|
||||
void _SelectCurrentMap();
|
||||
|
||||
status_t _GetSettings(BFile& file, int mode) const;
|
||||
|
@ -729,7 +729,7 @@ ModifierKeysWindow::_DuplicateKeys()
|
||||
uint32 left = 0;
|
||||
uint32 right = 0;
|
||||
|
||||
switch(key) {
|
||||
switch (key) {
|
||||
case MENU_ITEM_SHIFT:
|
||||
left = fCurrentMap->left_shift_key;
|
||||
right = fCurrentMap->right_shift_key;
|
||||
|
Loading…
Reference in New Issue
Block a user