Skip to content

Commit

Permalink
Resolve #1726
Browse files Browse the repository at this point in the history
  • Loading branch information
the-djmaze committed Sep 21, 2024
1 parent 88a66d6 commit 3576c22
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions dev/External/SquireUI.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,13 @@ class SquireUI
cmd: s => squire.setStyle({ fontFamily: s.value })
},
fontSize: {
select: ['11px','13px','16px','20px','24px','30px'],
defaultValueIndex: 2,
select: [[i18n('GLOBAL/DEFAULT'),''],'11px','13px','16px','20px','24px','30px'],
defaultValueIndex: 0,
cmd: s => squire.setStyle({ fontSize: s.value })
// TODO: maybe consider using https://developer.mozilla.org/en-US/docs/Web/CSS/font-size#values
// example:
// select: ['xx-small', 'x-small',' small',' medium', 'large', 'x-large', 'xx-large', 'xxx-large'],
// defaultValueIndex: 3,
// select: ['','xx-small', 'x-small',' small',' medium', 'large', 'x-large', 'xx-large', 'xxx-large'],
// defaultValueIndex: 0,
},
// dir: {
// select: [
Expand Down Expand Up @@ -355,6 +355,7 @@ class SquireUI
input.append(option);
});
} else {
input.add(new Option(i18n('GLOBAL/DEFAULT'), ''));
Object.entries(cfg.select).forEach(([label, options]) => {
let group = createElement('optgroup');
group.label = label;
Expand All @@ -363,7 +364,7 @@ class SquireUI
option.style[action] = value;
group.append(option);
});
input.append(group);
input.add(group);
});
}
ev = 'input';
Expand Down

0 comments on commit 3576c22

Please sign in to comment.