8000 fix cell toolbar · ElixirNote/elixirnote@8a17269 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8a17269

Browse files
committed
fix cell toolbar
1 parent 82ca4e9 commit 8a17269

File tree

7 files changed

+114
-28
lines changed
  • ui-components/style
  • 7 files changed

    +114
    -28
    lines changed

    packages/application/style/core.css

    Lines changed: 2 additions & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -13,7 +13,8 @@
    1313

    1414
    body {
    1515
    font-family: var(--jp-ui-font-family);
    16-
    background: var(--jp-layout-color3);
    16+
    17+
    /*background: var(--jp-layout-color3);*/
    1718
    margin: 0;
    1819
    padding: 0;
    1920
    overflow: hidden;

    packages/application/style/sidepanel.css

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -257,7 +257,7 @@
    257257
    }
    258258

    259259
    #jp-left-stack {
    260-
    /*border-right: var(--jp-border-width) solid var(--jp-border-color1);*/
    260+
    border-right: 1px solid #e0e0e0;
    261261
    }
    262262

    263263
    #jp-down-stack > .lm-TabPanel-stackedPanel {

    packages/filebrowser/style/base.css

    Lines changed: 3 additions & 4 deletions
    Original file line numberDiff line numberDiff line change
    @@ -25,7 +25,7 @@
    2525
    .jp-FileBrowser-toolbar.jp-Toolbar {
    2626
    border-bottom: none;
    2727
    height: auto;
    28-
    margin: 8px 12px 0 12px;
    28+
    margin: 8px 12px 0;
    2929
    box-shadow: none;
    3030
    padding: 0;
    3131
    justify-content: flex-start;
    @@ -123,9 +123,8 @@
    123123
    flex-direction: row;
    124124
    align-items: center;
    125125
    overflow: hidden;
    126-
    border-top: var(--jp-border-width) solid var(--jp-border-color2);
    127-
    border-bottom: var(--jp-border-width) solid var(--jp-border-color1);
    128-
    box-shadow: var(--jp-toolbar-box-shadow);
    126+
    border-top: 1px solid #e0e0e0;
    127+
    border-bottom: 1px solid #e0e0e0;
    129128
    z-index: 2;
    130129
    }
    131130

    packages/notebook-extension/schema/panel.json

    Lines changed: 1 addition & 13 deletions
    Original file line numberDiff line numberDiff line change
    @@ -3,26 +3,14 @@
    33
    "description": "Notebook Panel settings.",
    44
    "jupyter.lab.toolbars": {
    55
    "Notebook": [
    6-
    { "name": "save", "rank": 10 },
    76
    {
    87
    "name": "insert",
    98
    "command": "notebook:insert-cell-below",
    109
    "icon": "ui-components:add",
    1110
    "rank": 20
    1211
    },
    13-
    { "name": "cut", "command": "notebook:cut-cell", "rank": 21 },
    14-
    { "name": "copy", "command": "notebook:copy-cell", "rank": 22 },
    15-
    { "name": "paste", "command": "notebook:paste-cell-below", "rank": 23 },
    16-
    { "name": "run", "command": "runmenu:run", "rank": 30 },
    17-
    { "name": "interrupt", "command": "kernelmenu:interrupt", "rank": 31 },
    18-
    { "name": "restart", "command": "kernelmenu:restart", "rank": 32 },
    19-
    {
    20-
    "name": "restart-and-run",
    21-
    "command": "runmenu:restart-and-run-all",
    22-
    "rank": 33
    23-
    },
    24-
    { "name": "cellType", "rank": 40 },
    2512
    { "name": "spacer", "type": "spacer", "rank": 100 },
    13+
    { "name": "cellType", "rank": 200 },
    2614
    { "name": "kernelName", "rank": 1000 },
    2715
    { "name": "kernelStatus", "rank": 1001 },
    2816
    { "name": "executionProgress", "rank": 1002 }
    Lines changed: 93 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -0,0 +1,93 @@
    1+
    {
    2+
    "title": "Notebook Panel",
    3+
    "description": "Notebook Panel settings.",
    4+
    "jupyter.lab.toolbars": {
    5+
    "Notebook": [
    6+
    { "name": "save", "rank": 10 },
    7+
    {
    8+
    "name": "insert",
    9+
    "command": "notebook:insert-cell-below",
    10+
    "icon": "ui-components:add",
    11+
    "rank": 20
    12+
    },
    13+
    { "name": "cut", "command": "notebook:cut-cell", "rank": 21 },
    14+
    { "name": "copy", "command": "notebook:copy-cell", "rank": 22 },
    15+
    { "name": "paste", "command": "notebook:paste-cell-below", "rank": 23 },
    16+
    { "name": "run", "command": "runmenu:run", "rank": 30 },
    17+
    { "name": "interrupt", "command": "kernelmenu:interrupt", "rank": 31 },
    18+
    { "name": "restart", "command": "kernelmenu:restart", "rank": 32 },
    19+
    {
    20+
    "name": "restart-and-run",
    21+
    "command": "runmenu:restart-and-run-all",
    22+
    "rank": 33
    23+
    },
    24+
    { "name": "cellType", "rank": 40 },
    25+
    { "name": "spacer", "type": "spacer", "rank": 100 },
    26+
    { "name": "kernelName", "rank": 1000 },
    27+
    { "name": "kernelStatus", "rank": 1001 },
    28+
    { "name": "executionProgress", "rank": 1002 }
    29+
    ]
    30+
    },
    31+
    "jupyter.lab.transform": true,
    32+
    "properties": {
    33+
    "toolbar": {
    34+
    "title": "Notebook panel toolbar items",
    35+
    "description": "Note: To disable a toolbar item,\ncopy it to User Preferences and add the\n\"disabled\" key. The following example will disable the Interrupt button item:\n{\n \"toolbar\": [\n {\n \"name\": \"interrupt\",\n \"disabled\": true\n }\n ]\n}\n\nToolbar description:",
    36+
    "items": {
    37+
    "$ref": "#/definitions/toolbarItem"
    38+
    },
    39+
    "type": "array",
    40+
    "default": []
    41+
    }
    42+
    },
    43+
    "additionalProperties": false,
    44+
    "type": "object",
    45+
    "definitions": {
    46+
    "toolbarItem": {
    47+
    "properties": {
    48+
    "name": {
    49+
    "title": "Unique name",
    50+
    "type": "string"
    51+
    },
    52+
    "args": {
    53+
    "title": "Command arguments",
    54+
    "type": "object"
    55+
    },
    56+
    "command": {
    57+
    "title": "Command id",
    58+
    "type": "string",
    59+
    "default": ""
    60+
    },
    61+
    "disabled": {
    62+
    "title": "Whether the item is ignored or not",
    63+
    "type": "boolean",
    64+
    "default": false
    65+
    },
    66+
    "icon": {
    67+
    "title": "Item icon id",
    68+
    "description": "If defined, it will override the command icon",
    69+
    "type": "string"
    70+
    },
    71+
    "label": {
    72+
    "title": "Item label",
    73+
    "description": "If defined, it will override the command label",
    74+
    "type": "string"
    75+
    },
    76+
    "type": {
    77+
    "title": "Item type",
    78+
    "type": "string",
    79+
    "enum": ["command", "spacer"]
    80+
    },
    81+
    "rank": {
    82+
    "title": "Item rank",
    83+
    "type": "number",
    84+
    "minimum": 0,
    85+
    "default": 50
    86+
    }
    87+
    },
    88+
    "required": ["name"],
    89+
    "additionalProperties": false,
    90+
    "type": "object"
    91+
    }
    92+
    }
    93+
    }

    packages/ui-components/style/base.css

    Lines changed: 7 additions & 6 deletions
    Original file line numberDiff line numberDiff line change
    @@ -105,10 +105,10 @@ a:hover {
    105105
    .jp-InputGroup input {
    106106
    box-sizing: border-box;
    107107
    border: none;
    108-
    border-radius: 0;
    108+
    border-radius: 2px;
    109109
    background-color: transparent;
    110110
    color: var(--jp-ui-font-color0);
    111-
    box-shadow: inset 0 0 0 var(--jp-border-width) var(--jp-input-border-color);
    111+
    box-shadow: inset 0 0 0 1px #e0e0e0;
    112112
    padding-bottom: 0;
    113113
    padding-top: 0;
    114114
    padding-left: 10px;
    @@ -158,10 +158,10 @@ input::placeholder {
    158158

    159159
    .jp-HTMLSelect.jp-DefaultStyle select {
    160160
    background-color: initial;
    161-
    border: none;
    162-
    border-radius: 0;
    161+
    border: 1px solid #e0e0e0;
    162+
    border-radius: 2px;
    163163
    box-shadow: none;
    164-
    color: var(--jp-ui-font-color0);
    164+
    color: var(--jp-brand-color1);
    165165
    display: block;
    166166
    font-size: var(--jp-ui-font-size1);
    167167
    height: 24px;
    @@ -186,7 +186,8 @@ input::placeholder {
    186186
    /* Use our own theme for hover and option styles */
    187187
    .jp-HTMLSelect.jp-DefaultStyle select:hover,
    188188
    .jp-HTMLSelect.jp-DefaultStyle select > option {
    189-
    background-color: var(--jp-layout-color2);
    189+
    background-color: var(--jp-brand-color3);
    190+
    border-color: var(--jp-brand-color1);
    190191
    color: var(--jp-ui-font-color0);
    191192
    }
    192193

    packages/ui-components/style/toolbar.css

    Lines changed: 7 additions & 3 deletions
    Original file line numberDiff line numberDiff line change
    @@ -6,8 +6,8 @@
    66

    77
    :root {
    88
    --jp-private-toolbar-height: calc(
    9-
    28px + var(--jp-border-width)
    10-
    ); /* leave 28px for content */
    9+
    43px + var(--jp-border-width)
    10+
    ); /* leave 44px for content */
    1111
    }
    1212

    1313
    .jp-Toolbar {
    @@ -84,6 +84,10 @@ button.jp-ToolbarButtonComponent {
    8484
    min-height: unset;
    8585
    }
    8686

    87+
    button.jp-ToolbarButtonComponent[title='Switch kernel'] {
    88+
    border: 1px solid #e0e0e0;
    89+
    }
    90+
    8791
    button.jp-ToolbarButtonComponent:disabled {
    8892
    opacity: 0.4;
    8993
    }
    @@ -110,6 +114,6 @@ button.jp-ToolbarButtonComponent .jp-ToolbarButtonComponent-label {
    110114
    #jp-main-dock-panel[data-mode='single-document']
    111115
    .jp-MainAreaWidget
    112116
    > .jp-Toolbar {
    113-
    border: none;
    117+
    border-bottom: 1px solid #e0e0e0;
    114118
    box-shadow: none;
    115119
    }

    0 commit comments

    Comments
     (0)
    0