Merge branch 'master' into x86_64
Conflicts: build/jam/FloppyBootImage build/jam/OptionalBuildFeatures build/jam/OptionalPackages headers/private/shared/cpu_type.h src/bin/ps.c src/bin/sysinfo.cpp src/kits/tracker/PoseView.cpp src/preferences/appearance/DecorSettingsView.cpp src/preferences/virtualmemory/Settings.cpp src/servers/input/AddOnManager.cpp src/servers/input/InputServer.cpp src/servers/input/InputServerMethod.cpp src/system/boot/Jamfile src/system/boot/platform/raspberrypi_arm/mmu.cpp src/system/boot/platform/u-boot/arch/arm/Jamfile src/system/kernel/arch/x86/arch_cpu.cpp src/system/kernel/arch/x86/arch_thread.cpp src/system/kernel/cache/block_cache.cpp src/system/kernel/vm/VMAnonymousCache.cpp
This commit is contained in:
@@ -609,81 +609,87 @@ KeyboardLayoutView::_DrawKey(BView* view, BRect updateRect, const Key* key,
|
||||
be_control_look->DrawLabel(view, text, rect, updateRect,
|
||||
base, 0, BAlignment(B_ALIGN_CENTER, B_ALIGN_MIDDLE));
|
||||
} else if (key->shape == kEnterKeyShape) {
|
||||
BRegion region(rect);
|
||||
BRect originalRect = rect;
|
||||
BRect missingRect = rect;
|
||||
BRect topLeft = rect;
|
||||
BRect topRight = rect;
|
||||
BRect bottomLeft = rect;
|
||||
BRect bottomRight = rect;
|
||||
|
||||
// TODO: for some reason, this does not always equal the bottom of
|
||||
// the other keys...
|
||||
missingRect.top = floorf(rect.top
|
||||
bottomLeft.top = floorf(rect.top
|
||||
+ fLayout->DefaultKeySize().height * fFactor - fGap - 1);
|
||||
missingRect.right = floorf(missingRect.left
|
||||
bottomLeft.right = floorf(rect.left
|
||||
+ (key->frame.Width() - key->second_row) * fFactor - fGap - 2);
|
||||
region.Exclude(missingRect);
|
||||
view->ConstrainClippingRegion(®ion);
|
||||
|
||||
be_control_look->DrawButtonFrame(view, rect, updateRect,
|
||||
4.0f, 4.0f, 0.0f, 0.0f, base, background,
|
||||
pressed ? BControlLook::B_ACTIVATED : 0);
|
||||
topLeft.bottom = bottomLeft.top;
|
||||
topLeft.right = bottomLeft.right + 1;
|
||||
// add one to make the borders meet
|
||||
|
||||
view->ConstrainClippingRegion(®ion);
|
||||
topRight.bottom = topLeft.bottom;
|
||||
topRight.left = topLeft.right;
|
||||
|
||||
be_control_look->DrawButtonBackground(view, rect, updateRect,
|
||||
4.0f, 4.0f, 0.0f, 0.0f, base,
|
||||
pressed ? BControlLook::B_ACTIVATED : 0);
|
||||
bottomRight.top = bottomLeft.top;
|
||||
bottomRight.left = bottomLeft.right;
|
||||
|
||||
rect.left = missingRect.right;
|
||||
_GetAbbreviatedKeyLabelIfNeeded(view, rect, key, text, sizeof(text));
|
||||
|
||||
view->ConstrainClippingRegion(®ion);
|
||||
|
||||
be_control_look->DrawLabel(view, text, rect, updateRect,
|
||||
base, 0, BAlignment(B_ALIGN_CENTER, B_ALIGN_MIDDLE));
|
||||
|
||||
missingRect.right--;
|
||||
missingRect.top -= 2;
|
||||
region.Set(missingRect);
|
||||
view->ConstrainClippingRegion(®ion);
|
||||
|
||||
rect = originalRect;
|
||||
rect.bottom = missingRect.top + 2;
|
||||
|
||||
be_control_look->DrawButtonFrame(view, rect, updateRect,
|
||||
0.0f, 0.0f, 4.0f, 0.0f, base, background,
|
||||
// draw top left corner
|
||||
be_control_look->DrawButtonFrame(view, topLeft, updateRect,
|
||||
4.0f, 0.0f, 4.0f, 0.0f, base, background,
|
||||
pressed ? BControlLook::B_ACTIVATED : 0,
|
||||
BControlLook::B_LEFT_BORDER | BControlLook::B_BOTTOM_BORDER);
|
||||
|
||||
view->ConstrainClippingRegion(®ion);
|
||||
|
||||
be_control_look->DrawButtonBackground(view, rect, updateRect,
|
||||
0.0f, 0.0f, 4.0f, 0.0f, base,
|
||||
BControlLook::B_LEFT_BORDER | BControlLook::B_TOP_BORDER
|
||||
| BControlLook::B_BOTTOM_BORDER);
|
||||
be_control_look->DrawButtonBackground(view, topLeft, updateRect,
|
||||
4.0f, 0.0f, 4.0f, 0.0f, base,
|
||||
pressed ? BControlLook::B_ACTIVATED : 0,
|
||||
BControlLook::B_LEFT_BORDER | BControlLook::B_BOTTOM_BORDER);
|
||||
BControlLook::B_LEFT_BORDER | BControlLook::B_TOP_BORDER
|
||||
| BControlLook::B_BOTTOM_BORDER);
|
||||
|
||||
missingRect.left = missingRect.right;
|
||||
missingRect.right++;
|
||||
missingRect.top += 2;
|
||||
region.Set(missingRect);
|
||||
view->ConstrainClippingRegion(®ion);
|
||||
// draw top right corner
|
||||
be_control_look->DrawButtonFrame(view, topRight, updateRect,
|
||||
0.0f, 4.0f, 0.0f, 0.0f, base, background,
|
||||
pressed ? BControlLook::B_ACTIVATED : 0,
|
||||
BControlLook::B_TOP_BORDER | BControlLook::B_RIGHT_BORDER);
|
||||
be_control_look->DrawButtonBackground(view, topRight, updateRect,
|
||||
0.0f, 4.0f, 0.0f, 0.0f, base,
|
||||
pressed ? BControlLook::B_ACTIVATED : 0,
|
||||
BControlLook::B_TOP_BORDER | BControlLook::B_RIGHT_BORDER);
|
||||
|
||||
rect = originalRect;
|
||||
rect.left = missingRect.right - 2;
|
||||
rect.top = missingRect.top - 2;
|
||||
|
||||
be_control_look->DrawButtonFrame(view, rect, updateRect,
|
||||
// draw bottom right corner
|
||||
be_control_look->DrawButtonFrame(view, bottomRight, updateRect,
|
||||
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);
|
||||
|
||||
view->ConstrainClippingRegion(®ion);
|
||||
|
||||
be_control_look->DrawButtonBackground(view, rect, updateRect,
|
||||
| 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;
|
||||
bottomLeft.top -= 2;
|
||||
BRegion region(rect);
|
||||
region.Exclude(bottomLeft);
|
||||
view->ConstrainClippingRegion(®ion);
|
||||
|
||||
// Fill in the rect with the background color
|
||||
SetHighColor(background);
|
||||
FillRect(rect);
|
||||
|
||||
// draw the button background
|
||||
BRect bgRect = rect.InsetByCopy(2, 2);
|
||||
be_control_look->DrawButtonBackground(view, bgRect, updateRect,
|
||||
4.0f, 4.0f, 0.0f, 4.0f, base,
|
||||
pressed ? BControlLook::B_ACTIVATED : 0);
|
||||
|
||||
rect.left = bottomLeft.right;
|
||||
_GetAbbreviatedKeyLabelIfNeeded(view, rect, key, text, sizeof(text));
|
||||
|
||||
// draw the button label
|
||||
be_control_look->DrawLabel(view, text, rect, updateRect,
|
||||
base, 0, BAlignment(B_ALIGN_CENTER, B_ALIGN_MIDDLE));
|
||||
|
||||
// reset the clipping region
|
||||
view->ConstrainClippingRegion(NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ static const uint32 kModifierKeys = B_SHIFT_KEY | B_CAPS_LOCK | B_CONTROL_KEY
|
||||
|
||||
|
||||
static void
|
||||
print_key(char *chars, int32 offset)
|
||||
print_key(char *chars, int32 offset, bool last = false)
|
||||
{
|
||||
int size = chars[offset++];
|
||||
|
||||
@@ -53,7 +53,8 @@ print_key(char *chars, int32 offset)
|
||||
}
|
||||
}
|
||||
|
||||
fputs("\t", stdout);
|
||||
if (!last)
|
||||
fputs("\t", stdout);
|
||||
}
|
||||
|
||||
|
||||
@@ -110,7 +111,7 @@ Keymap::DumpKeymap()
|
||||
print_key(fChars, fKeys.caps_map[i]);
|
||||
print_key(fChars, fKeys.caps_shift_map[i]);
|
||||
print_key(fChars, fKeys.option_caps_map[i]);
|
||||
print_key(fChars, fKeys.option_caps_shift_map[i]);
|
||||
print_key(fChars, fKeys.option_caps_shift_map[i], true);
|
||||
fputs("\n", stdout);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user