Skip to content

Commit 73e891b

Browse files
committed
fix: QEditor toolbar btns + fix scroll on iOS; Button sizes, padding, dense, btn groups and dropdown alignment
1 parent d9a2b4c commit 73e891b

File tree

13 files changed

+35
-29
lines changed

13 files changed

+35
-29
lines changed

dev/components/components/button-dropdown.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
<div v-for="(cfg, index1) in conf" :key="`${cfg.split}-${cfg.dense}`">
44
<div v-for="(size, index2) in sizes" :key="size">
55
<p class="caption">{{ label(cfg) }} - {{ size }}</p>
6+
text
7+
<q-btn :size="size" color="primary" glossy :dense="cfg.dense" label="Test" />
68
<q-btn-dropdown ref="first" :size="size" :split="cfg.split" :dense="cfg.dense" @show="log('open')" @hide="log('close')" @click="log('click')" color="primary" glossy label="Dropdown Button" style="margin: 15px">
79
<q-list link>
810
<q-list-header inset>Folders X</q-list-header>

dev/components/components/button.vue

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,22 @@
33
<div class="layout-padding buttons-test">
44
<p class="group">
55
<template v-for="n in ['xs', 'sm', 'md', 'lg', 'xl']">
6-
<span>{{n}}</span>
76
<q-btn :size="n" dense icon="android" color="primary" />
87
<q-btn :size="n" icon="android" color="primary" />
8+
<q-btn :size="n" label="Test" color="primary" />
99
<q-btn :size="n" icon="android" color="primary" label="Test"/>
1010
<q-btn :size="n" round icon="android" color="primary" />
1111
<q-btn :size="n" round icon="android" color="primary" dense />
1212
<q-btn :size="n" label="Test" color="primary" />
13+
<span>{{n}}</span>
14+
<br><br>
15+
</template>
16+
<template v-for="n in ['xs', 'sm', 'md', 'lg', 'xl']">
17+
<q-btn :size="n" dense label="Test" color="primary" />
18+
<q-btn :size="n" dense icon="android" color="primary" />
19+
<q-btn :size="n" dense icon="android" color="primary" label="Test"/>
20+
<q-btn :size="n" dense round icon="android" color="primary" />
21+
<span>{{n}}</span>
1322
<br><br>
1423
</template>
1524
</p>
@@ -27,7 +36,7 @@
2736
<q-toolbar color="black" style="width: 500px">
2837
<q-btn flat round icon="menu" />
2938
<q-btn flat round icon="android" />
30-
<q-btn flat round icon="assignment_ind" />
39+
<q-btn flat dense icon="assignment_ind" />
3140
<q-btn flat round icon="android" />
3241
<q-toolbar-title>
3342
Toolbar

dev/components/form/editor.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<template>
22
<div class="layout-padding">
33
<q-editor
4-
style="margin-right: 8em"
54
ref="editor"
65
v-model="model"
76
:toolbar="[
@@ -71,8 +70,8 @@
7170
gogu: {tip: 'Custom', icon: 'account_balance', handler: vm => vm.runCmd('print')}
7271
}"
7372
>
74-
<q-btn dense size="sm" color="yellow" slot="custom_btn">Wow</q-btn>
75-
<q-btn-dropdown size="sm" dense no-caps ref="token" no-wrap slot="token" color="green" label="Token">
73+
<q-btn dense color="yellow" slot="custom_btn">Wow</q-btn>
74+
<q-btn-dropdown dense no-caps ref="token" no-wrap slot="token" color="green" label="Token">
7675
<q-list link separator>
7776
<q-item tag="label" @click.native="add('email')">
7877
<q-item-side icon="mail" />

src/components/btn/btn-default.ios.styl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
outline 0
66
border 0
77
vertical-align middle
8-
vertical-align -webkit-baseline-middle
98
cursor pointer
109
-webkit-appearance button
1110
padding $button-padding
@@ -58,8 +57,8 @@
5857
width 3em
5958

6059
.q-btn-dense
61-
padding $button-dense-padding
62-
min-height 0
60+
padding .285em
61+
min-height 2em
6362
&.q-btn-round
6463
padding 0
6564
height 2.4em

src/components/btn/btn-default.mat.styl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
outline 0
66
border 0
77
vertical-align middle
8-
vertical-align -webkit-baseline-middle
98
cursor pointer
109
-webkit-appearance button
1110
padding $button-padding
@@ -73,8 +72,8 @@
7372
box-shadow $shadow-8
7473

7574
.q-btn-dense
76-
padding $button-dense-padding
77-
min-height 0
75+
padding .285em
76+
min-height 2em
7877
&.q-btn-round
7978
padding 0
8079
height 2.4em
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
.q-btn-dropdown-simple .q-btn-dropdown-arrow
2-
width 10px
3-
font-size 24px
41
.q-btn-dropdown-split .q-btn-dropdown-arrow
52
padding 0 4px
63
border-left 1px solid rgba(255, 255, 255, .3)
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
.q-btn-dropdown-simple .q-btn-dropdown-arrow
2-
width 10px
3-
font-size 24px
41
.q-btn-dropdown-split .q-btn-dropdown-arrow
52
padding 0 4px
63
border-left 1px solid rgba(255, 255, 255, .3)

src/components/btn/btn-group.ios.styl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.q-btn-group
22
border-radius $button-border-radius
3-
vertical-align text-bottom
3+
vertical-align middle
44
.q-btn:not(:last-child)
55
border-top-right-radius 0
66
border-bottom-right-radius 0

src/components/btn/btn-group.mat.styl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.q-btn-group
22
border-radius $button-border-radius
33
box-shadow $button-shadow
4-
vertical-align text-bottom
4+
vertical-align middle
55
> .q-btn-group
66
box-shadow none
77
.q-btn

src/components/editor/QEditor.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ export default {
5959
outline: this.outline,
6060
flat: this.flat,
6161
push: this.push,
62-
size: 'sm',
6362
dense: true
6463
}
6564
},
@@ -259,14 +258,18 @@ export default {
259258
const toolbars = []
260259
if (!this.readonly) {
261260
const toolbarConfig = {
262-
staticClass: `q-editor-toolbar q-editor-toolbar-padding overflow-auto row no-wrap bg-${this.toolbarColor}`,
261+
staticClass: `q-editor-toolbar row no-wrap scroll bg-${this.toolbarColor}`,
263262
'class': {
264263
'q-editor-toolbar-separator': !this.outline && !this.push
265264
}
266265
}
267-
toolbars.push(h('div', extend({key: 'qedt_top'}, toolbarConfig), getToolbar(h, this)))
266+
toolbars.push(h('div', extend({key: 'qedt_top'}, toolbarConfig), [
267+
h('div', { staticClass: 'row no-wrap q-editor-toolbar-padding fit items-center' }, getToolbar(h, this))
268+
]))
268269
if (this.editLinkUrl !== null) {
269-
toolbars.push(h('div', extend({key: 'qedt_btm'}, toolbarConfig), getLinkEditor(h, this)))
270+
toolbars.push(h('div', extend({key: 'qedt_btm'}, toolbarConfig), [
271+
h('div', { staticClass: 'row no-wrap q-editor-toolbar-padding fit items-center' }, getLinkEditor(h, this))
272+
]))
270273
}
271274
}
272275
return h(

0 commit comments

Comments
 (0)