Commit e9847d79 authored by Luciano Pacheco's avatar Luciano Pacheco Committed by Commit Bot

SMB: Credential dialog new styles

Change SMB credentials dialog to comply with the new styles for Files
app.

Remove close button/icon from the dialog.

Adjust the padding and spacing in the dialog, which changed the total
height for the dialog from 250px to 230px.

See crbug.com/992827#c38 for screenshots of before and after.

Bug: 992827
Change-Id: Iaf0401186beb0f997451080e43d14b735fd93e41
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2235228
Commit-Queue: Anand Mistry <amistry@chromium.org>
Reviewed-by: default avatarAnand Mistry <amistry@chromium.org>
Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Auto-Submit: Luciano Pacheco <lucmult@chromium.org>
Cr-Commit-Position: refs/heads/master@{#776844}
parent 1bee532e
...@@ -5,10 +5,28 @@ ...@@ -5,10 +5,28 @@
width: 100%; width: 100%;
} }
cr-dialog::part(wrapper) {
/* Subtract the internal padding in <cr-dialog>. */
padding: calc(24px - 20px);
}
cr-input { cr-input {
--cr-input-error-display: none; --cr-input-error-display: none;
margin-bottom: var(--cr-form-field-bottom-spacing); margin-bottom: var(--cr-form-field-bottom-spacing);
} }
[slot='title'] {
padding-top: 4px;
}
[slot='body'] #password {
margin-bottom: 0;
}
[slot='button-container'] {
padding-bottom: 20px;
padding-top: 32px;
}
</style> </style>
<cr-dialog id="dialog"> <cr-dialog id="dialog">
......
...@@ -20,7 +20,7 @@ namespace chromeos { ...@@ -20,7 +20,7 @@ namespace chromeos {
namespace smb_dialog { namespace smb_dialog {
namespace { namespace {
constexpr int kSmbCredentialsDialogHeight = 250; constexpr int kSmbCredentialsDialogHeight = 230;
void AddSmbCredentialsDialogStrings(content::WebUIDataSource* html_source) { void AddSmbCredentialsDialogStrings(content::WebUIDataSource* html_source) {
static const struct { static const struct {
...@@ -135,5 +135,9 @@ void SmbCredentialsDialogUI::OnUpdateCredentials(const std::string& username, ...@@ -135,5 +135,9 @@ void SmbCredentialsDialogUI::OnUpdateCredentials(const std::string& username,
} }
} }
bool SmbCredentialsDialog::ShouldShowCloseButton() const {
return false;
}
} // namespace smb_dialog } // namespace smb_dialog
} // namespace chromeos } // namespace chromeos
...@@ -41,6 +41,7 @@ class SmbCredentialsDialog : public SystemWebDialogDelegate { ...@@ -41,6 +41,7 @@ class SmbCredentialsDialog : public SystemWebDialogDelegate {
// ui::WebDialogDelegate // ui::WebDialogDelegate
void GetDialogSize(gfx::Size* size) const override; void GetDialogSize(gfx::Size* size) const override;
std::string GetDialogArgs() const override; std::string GetDialogArgs() const override;
bool ShouldShowCloseButton() const override;
private: private:
const std::string mount_id_; const std::string mount_id_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment