summaryrefslogtreecommitdiff
path: root/lockscreen
diff options
authorhandsome_feng <445865575@qq.com>2015-11-12 10:14:37 +0800
committerhandsome_feng <445865575@qq.com>2015-11-12 10:14:37 +0800
commitd6a56f9b78ef585784c2b72810316ff28635881b (patch)
treec2dc9984185d36028bb48714f44d2a6640d59f4e /lockscreen
parent552ce4d44ab796a441d8ddf2a881de4705ad3c44 (diff)
Update the icon to the final version
(bzr r4016.2.25)
Diffstat (limited to 'lockscreen')
-rw-r--r--lockscreen/KylinUserPromptView.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/lockscreen/KylinUserPromptView.cpp b/lockscreen/KylinUserPromptView.cpp
index ecdd15f22..a61d4796b 100644
--- a/lockscreen/KylinUserPromptView.cpp
+++ b/lockscreen/KylinUserPromptView.cpp
@@ -47,8 +47,7 @@ const RawPixel LAYOUT_MARGIN = 20_em;
const RawPixel MSG_LAYOUT_MARGIN = 15_em;
const RawPixel MSG_LAYOUT_PADDING = 33_em;
const RawPixel PROMPT_LAYOUT_MARGIN = 5_em;
-const RawPixel SWITCH_ICON_HEIGHT = 32_em;
-const RawPixel SWITCH_ICON_WIDTH = 100_em;
+const RawPixel SWITCH_ICON_SIZE = 32_em;
const RawPixel AVATAR_SIZE = 128_em;
const RawPixel TEXT_INPUT_HEIGHT = 36_em;
const RawPixel TEXT_INPUT_WIDTH = 320_em;
@@ -127,12 +126,12 @@ void KylinUserPromptView::ResetLayout()
nux::Layout* switch_layout = new nux::HLayout();
TextureCache& cache = TextureCache::GetDefault();
- SwitchIcon_ = new IconTexture(cache.FindTexture("switch_user.png", SWITCH_ICON_WIDTH.CP(scale), SWITCH_ICON_HEIGHT.CP(scale)));
+ SwitchIcon_ = new IconTexture(cache.FindTexture("switch_user.png", SWITCH_ICON_SIZE.CP(scale), SWITCH_ICON_SIZE.CP(scale)));
switch_layout->AddView(SwitchIcon_);
SwitchIcon_->mouse_click.connect([this](int x, int y, unsigned long button_flags, unsigned long key_flags) {
session_manager_->SwitchToGreeter();
});
- switch_layout->SetMaximumSize(SWITCH_ICON_WIDTH.CP(scale), SWITCH_ICON_HEIGHT.CP(scale));
+ switch_layout->SetMaximumSize(SWITCH_ICON_SIZE.CP(scale), SWITCH_ICON_SIZE.CP(scale));
GetLayout()->AddLayout(switch_layout);
}
@@ -167,7 +166,7 @@ void KylinUserPromptView::ResetLayout()
void KylinUserPromptView::UpdateSize()
{
- auto width = 15 * Settings::GRID_SIZE.CP(scale);
+ auto width = 13 * Settings::GRID_SIZE.CP(scale);
auto height = 3 * Settings::GRID_SIZE.CP(scale);
SetMinimumWidth(width);