summaryrefslogtreecommitdiff
path: root/lockscreen
diff options
authorhandsome_feng <445865575@qq.com>2015-10-20 13:48:23 +0800
committerhandsome_feng <445865575@qq.com>2015-10-20 13:48:23 +0800
commit612d281fcd8cf4a22aca8c51d3f558c73a380adc (patch)
tree17baac6864f2d4adf753a61b03c2ead43af7b7b8 /lockscreen
parentc5e48a8838a6cd6cb0b5301f6bb3c67d3b7c2a83 (diff)
Modified the textinput temporary
(bzr r4016.2.9)
Diffstat (limited to 'lockscreen')
-rw-r--r--lockscreen/KylinLockScreenShield.cpp3
-rw-r--r--lockscreen/KylinUserPromptView.cpp8
2 files changed, 6 insertions, 5 deletions
diff --git a/lockscreen/KylinLockScreenShield.cpp b/lockscreen/KylinLockScreenShield.cpp
index 53364ab49..baea23c7b 100644
--- a/lockscreen/KylinLockScreenShield.cpp
+++ b/lockscreen/KylinLockScreenShield.cpp
@@ -152,6 +152,7 @@ void KylinShield::ShowPrimaryView()
{
prompt_view_->scale = scale();
prompt_layout_->AddView(prompt_view_.GetPointer());
+ prompt_layout_->AddSpace(0, 10);
}
GrabScreen(false);
@@ -165,11 +166,11 @@ void KylinShield::ShowPrimaryView()
SetLayout(primary_layout_.GetPointer());
prompt_layout_ = new nux::HLayout();
- prompt_layout_->SetLeftAndRightPadding(11 * Settings::GRID_SIZE.CP(scale));
if (prompt_view_)
{
prompt_view_->scale = scale();
+ prompt_layout_->AddSpace(0, 10);
prompt_layout_->AddView(prompt_view_.GetPointer());
}
diff --git a/lockscreen/KylinUserPromptView.cpp b/lockscreen/KylinUserPromptView.cpp
index a32a29c23..80a67fabd 100644
--- a/lockscreen/KylinUserPromptView.cpp
+++ b/lockscreen/KylinUserPromptView.cpp
@@ -48,7 +48,7 @@ const RawPixel LAYOUT_MARGIN = 20_em;
const RawPixel MSG_LAYOUT_MARGIN = 15_em;
const RawPixel PROMPT_LAYOUT_MARGIN = 5_em;
const RawPixel SWITCH_ICON_HEIGHT = 32_em;
-const RawPixel SWITCH_ICON_WIDTH = 70_em;
+const RawPixel SWITCH_ICON_WIDTH = 100_em;
const RawPixel AVATAR_SIZE = 128_em;
const RawPixel TEXT_INPUT_HEIGHT = 36_em;
const RawPixel TEXT_INPUT_WIDTH = 320_em;
@@ -172,7 +172,6 @@ void KylinUserPromptView::UpdateSize()
{
layout->SetLeftAndRightPadding(PADDING.CP(scale));
layout->SetTopAndBottomPadding(PADDING.CP(scale));
-// static_cast<nux::HLayout*>(layout)->SetHorizontalInternalMargin(300);//LAYOUT_MARGIN.CP(scale));
}
if (username_)
@@ -196,8 +195,8 @@ void KylinUserPromptView::UpdateSize()
for (auto* area : prompt_layout_->GetChildren())
{
auto* text_input = static_cast<TextInput*>(area);
- text_input->SetMinimumHeight(Settings::GRID_SIZE.CP(scale));
- text_input->SetMaximumHeight(Settings::GRID_SIZE.CP(scale));
+ text_input->SetMinimumHeight(TEXT_INPUT_HEIGHT.CP(scale));
+ text_input->SetMaximumHeight(TEXT_INPUT_HEIGHT.CP(scale));
text_input->SetMinimumWidth(TEXT_INPUT_WIDTH.CP(scale));
text_input->SetMaximumWidth(TEXT_INPUT_WIDTH.CP(scale));
text_input->scale = scale();
@@ -286,6 +285,7 @@ void KylinUserPromptView::AddPrompt(std::string const& message, bool visible, Pr
text_entry->SetPasswordChar("•");
text_entry->SetToggleCursorVisibilityOnKeyFocus(true);
text_entry->clipboard_enabled = false;
+ text_entry->SetTextColor(nux::color::Black);
text_input->SetMinimumHeight(TEXT_INPUT_HEIGHT.CP(scale));
text_input->SetMaximumHeight(TEXT_INPUT_HEIGHT.CP(scale));