From 9f79ceca82bbe031f67887d9af62c63644b2fe84 Mon Sep 17 00:00:00 2001 From: martinRenou Date: Wed, 8 Jan 2020 15:36:26 +0100 Subject: [PATCH] Tabs -> spaces Signed-off-by: martinRenou --- ipywidgets/widgets/widget_bool.py | 4 ++-- packages/base/src/widget.ts | 6 +++--- packages/controls/css/widgets-base.css | 12 +++++------ packages/controls/src/widget_string.ts | 30 +++++++++++++------------- 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/ipywidgets/widgets/widget_bool.py b/ipywidgets/widgets/widget_bool.py index c5fd836ace..f6411e91b2 100644 --- a/ipywidgets/widgets/widget_bool.py +++ b/ipywidgets/widgets/widget_bool.py @@ -35,7 +35,7 @@ class Checkbox(_Bool): value : {True,False} value of the checkbox: True-checked, False-unchecked description : str - description displayed next to the checkbox + description displayed next to the checkbox indent : {True,False} indent the control to align with other controls with a description. The style.description_width attribute controls this width for consistence with other controls. """ @@ -53,7 +53,7 @@ class ToggleButton(_Bool): value : {True,False} value of the toggle button: True-pressed, False-unpressed description : str - description displayed next to the button + description displayed next to the button tooltip: str tooltip caption of the toggle button icon: str diff --git a/packages/base/src/widget.ts b/packages/base/src/widget.ts index 5e5ba0448e..6ef200f0cf 100644 --- a/packages/base/src/widget.ts +++ b/packages/base/src/widget.ts @@ -643,10 +643,10 @@ class WidgetView extends NativeView { */ handle_message(content: any) { if (content.do == 'focus') { - this.el.focus(); + this.el.focus(); } else if (content.do == 'blur') { - this.el.blur(); - } + this.el.blur(); + } }; /** diff --git a/packages/controls/css/widgets-base.css b/packages/controls/css/widgets-base.css index c7491cc8f0..09baa0eb99 100644 --- a/packages/controls/css/widgets-base.css +++ b/packages/controls/css/widgets-base.css @@ -436,7 +436,7 @@ flex-shrink: 1; outline: none !important; } - + .widget-text input[type="text"], .widget-text input[type="password"], .widget-textarea textarea { padding: var(--jp-widgets-input-padding) calc( var(--jp-widgets-input-padding) * 2); } @@ -686,12 +686,12 @@ font-size: var(--jp-widgets-font-size); vertical-align: top; padding-left: calc( var(--jp-widgets-input-padding) * 2); - appearance: none; - -webkit-appearance: none; - -moz-appearance: none; + appearance: none; + -webkit-appearance: none; + -moz-appearance: none; background-repeat: no-repeat; - background-size: 20px; - background-position: right center; + background-size: 20px; + background-position: right center; background-image: var(--jp-widgets-dropdown-arrow); } .widget-dropdown > select:focus { diff --git a/packages/controls/src/widget_string.ts b/packages/controls/src/widget_string.ts index 973d004dfb..132430baf1 100644 --- a/packages/controls/src/widget_string.ts +++ b/packages/controls/src/widget_string.ts @@ -76,10 +76,10 @@ class HTMLView extends DescriptionView { */ handle_message(content: any) { if (content.do == 'focus') { - this.content.focus(); + this.content.focus(); } else if (content.do == 'blur') { - this.content.blur(); - } + this.content.blur(); + } }; content: HTMLDivElement; @@ -126,10 +126,10 @@ class HTMLMathView extends DescriptionView { */ handle_message(content: any) { if (content.do == 'focus') { - this.content.focus(); + this.content.focus(); } else if (content.do == 'blur') { - this.content.blur(); - } + this.content.blur(); + } }; content: HTMLDivElement; @@ -298,10 +298,10 @@ class TextareaView extends DescriptionView { */ handle_message(content: any) { if (content.do == 'focus') { - this.textbox.focus(); + this.textbox.focus(); } else if (content.do == 'blur') { - this.textbox.blur(); - } + this.textbox.blur(); + } }; textbox: HTMLTextAreaElement; @@ -448,10 +448,10 @@ class TextView extends DescriptionView { */ handle_message(content: any) { if (content.do == 'focus') { - this.textbox.focus(); + this.textbox.focus(); } else if (content.do == 'blur') { - this.textbox.blur(); - } + this.textbox.blur(); + } }; protected readonly inputType: string = 'text'; @@ -567,10 +567,10 @@ class ComboboxView extends TextView { */ handle_message(content: any) { if (content.do == 'focus') { - this.textbox.focus(); + this.textbox.focus(); } else if (content.do == 'blur') { - this.textbox.blur(); - } + this.textbox.blur(); + } }; highlightValidState(valid: boolean): void {