mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-20 15:34:49 +02:00
Begin making UI adapt correctly to scaled text sizes (re: #7965)
This commit is contained in:
@@ -57,13 +57,13 @@ export function uiFieldHelp(context, fieldName) {
|
||||
var replacements = {
|
||||
distField: t('restriction.controls.distance'),
|
||||
viaField: t('restriction.controls.via'),
|
||||
fromShadow: icon('#iD-turn-shadow', 'pre-text shadow from'),
|
||||
allowShadow: icon('#iD-turn-shadow', 'pre-text shadow allow'),
|
||||
restrictShadow: icon('#iD-turn-shadow', 'pre-text shadow restrict'),
|
||||
onlyShadow: icon('#iD-turn-shadow', 'pre-text shadow only'),
|
||||
allowTurn: icon('#iD-turn-yes', 'pre-text turn'),
|
||||
restrictTurn: icon('#iD-turn-no', 'pre-text turn'),
|
||||
onlyTurn: icon('#iD-turn-only', 'pre-text turn')
|
||||
fromShadow: icon('#iD-turn-shadow', 'inline shadow from'),
|
||||
allowShadow: icon('#iD-turn-shadow', 'inline shadow allow'),
|
||||
restrictShadow: icon('#iD-turn-shadow', 'inline shadow restrict'),
|
||||
onlyShadow: icon('#iD-turn-shadow', 'inline shadow only'),
|
||||
allowTurn: icon('#iD-turn-yes', 'inline turn'),
|
||||
restrictTurn: icon('#iD-turn-no', 'inline turn'),
|
||||
onlyTurn: icon('#iD-turn-only', 'inline turn')
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -436,7 +436,7 @@ export function uiIntroArea(context, reveal) {
|
||||
});
|
||||
|
||||
reveal('.entity-editor-pane',
|
||||
helpString('intro.areas.describe_playground', { button: icon('#iD-icon-close', 'pre-text') }),
|
||||
helpString('intro.areas.describe_playground', { button: icon('#iD-icon-close', 'inline') }),
|
||||
{ duration: 300 }
|
||||
);
|
||||
|
||||
|
||||
@@ -300,7 +300,7 @@ export function uiIntroBuilding(context, reveal) {
|
||||
|
||||
timeout(function() {
|
||||
reveal('.entity-editor-pane',
|
||||
helpString('intro.buildings.close', { button: icon('#iD-icon-close', 'pre-text') })
|
||||
helpString('intro.buildings.close', { button: icon('#iD-icon-close', 'inline') })
|
||||
);
|
||||
}, 500);
|
||||
|
||||
@@ -628,7 +628,7 @@ export function uiIntroBuilding(context, reveal) {
|
||||
|
||||
timeout(function() {
|
||||
reveal('.entity-editor-pane',
|
||||
helpString('intro.buildings.close', { button: icon('#iD-icon-close', 'pre-text') })
|
||||
helpString('intro.buildings.close', { button: icon('#iD-icon-close', 'inline') })
|
||||
);
|
||||
}, 500);
|
||||
|
||||
|
||||
+28
-28
@@ -51,34 +51,34 @@ export function helpString(id, replacements) {
|
||||
// only load these the first time
|
||||
if (!helpStringReplacements) helpStringReplacements = {
|
||||
// insert icons corresponding to various UI elements
|
||||
point_icon: icon('#iD-icon-point', 'pre-text'),
|
||||
line_icon: icon('#iD-icon-line', 'pre-text'),
|
||||
area_icon: icon('#iD-icon-area', 'pre-text'),
|
||||
note_icon: icon('#iD-icon-note', 'pre-text add-note'),
|
||||
plus: icon('#iD-icon-plus', 'pre-text'),
|
||||
minus: icon('#iD-icon-minus', 'pre-text'),
|
||||
move_icon: icon('#iD-operation-move', 'pre-text operation'),
|
||||
merge_icon: icon('#iD-operation-merge', 'pre-text operation'),
|
||||
delete_icon: icon('#iD-operation-delete', 'pre-text operation'),
|
||||
circularize_icon: icon('#iD-operation-circularize', 'pre-text operation'),
|
||||
split_icon: icon('#iD-operation-split', 'pre-text operation'),
|
||||
orthogonalize_icon: icon('#iD-operation-orthogonalize', 'pre-text operation'),
|
||||
disconnect_icon: icon('#iD-operation-disconnect', 'pre-text operation'),
|
||||
layers_icon: icon('#iD-icon-layers', 'pre-text'),
|
||||
data_icon: icon('#iD-icon-data', 'pre-text'),
|
||||
inspect: icon('#iD-icon-inspect', 'pre-text'),
|
||||
help_icon: icon('#iD-icon-help', 'pre-text'),
|
||||
undo_icon: icon(localizer.textDirection() === 'rtl' ? '#iD-icon-redo' : '#iD-icon-undo', 'pre-text'),
|
||||
redo_icon: icon(localizer.textDirection() === 'rtl' ? '#iD-icon-undo' : '#iD-icon-redo', 'pre-text'),
|
||||
save_icon: icon('#iD-icon-save', 'pre-text'),
|
||||
leftclick: icon('#iD-walkthrough-mouse-left', 'pre-text operation'),
|
||||
rightclick: icon('#iD-walkthrough-mouse-right', 'pre-text operation'),
|
||||
mousewheel_icon: icon('#iD-walkthrough-mousewheel', 'pre-text operation'),
|
||||
tap_icon: icon('#iD-walkthrough-tap', 'pre-text operation'),
|
||||
doubletap_icon: icon('#iD-walkthrough-doubletap', 'pre-text operation'),
|
||||
longpress_icon: icon('#iD-walkthrough-longpress', 'pre-text operation'),
|
||||
touchdrag_icon: icon('#iD-walkthrough-touchdrag', 'pre-text operation'),
|
||||
pinch_icon: icon('#iD-walkthrough-pinch-apart', 'pre-text operation'),
|
||||
point_icon: icon('#iD-icon-point', 'inline'),
|
||||
line_icon: icon('#iD-icon-line', 'inline'),
|
||||
area_icon: icon('#iD-icon-area', 'inline'),
|
||||
note_icon: icon('#iD-icon-note', 'inline add-note'),
|
||||
plus: icon('#iD-icon-plus', 'inline'),
|
||||
minus: icon('#iD-icon-minus', 'inline'),
|
||||
move_icon: icon('#iD-operation-move', 'inline operation'),
|
||||
merge_icon: icon('#iD-operation-merge', 'inline operation'),
|
||||
delete_icon: icon('#iD-operation-delete', 'inline operation'),
|
||||
circularize_icon: icon('#iD-operation-circularize', 'inline operation'),
|
||||
split_icon: icon('#iD-operation-split', 'inline operation'),
|
||||
orthogonalize_icon: icon('#iD-operation-orthogonalize', 'inline operation'),
|
||||
disconnect_icon: icon('#iD-operation-disconnect', 'inline operation'),
|
||||
layers_icon: icon('#iD-icon-layers', 'inline'),
|
||||
data_icon: icon('#iD-icon-data', 'inline'),
|
||||
inspect: icon('#iD-icon-inspect', 'inline'),
|
||||
help_icon: icon('#iD-icon-help', 'inline'),
|
||||
undo_icon: icon(localizer.textDirection() === 'rtl' ? '#iD-icon-redo' : '#iD-icon-undo', 'inline'),
|
||||
redo_icon: icon(localizer.textDirection() === 'rtl' ? '#iD-icon-undo' : '#iD-icon-redo', 'inline'),
|
||||
save_icon: icon('#iD-icon-save', 'inline'),
|
||||
leftclick: icon('#iD-walkthrough-mouse-left', 'inline operation'),
|
||||
rightclick: icon('#iD-walkthrough-mouse-right', 'inline operation'),
|
||||
mousewheel_icon: icon('#iD-walkthrough-mousewheel', 'inline operation'),
|
||||
tap_icon: icon('#iD-walkthrough-tap', 'inline operation'),
|
||||
doubletap_icon: icon('#iD-walkthrough-doubletap', 'inline operation'),
|
||||
longpress_icon: icon('#iD-walkthrough-longpress', 'inline operation'),
|
||||
touchdrag_icon: icon('#iD-walkthrough-touchdrag', 'inline operation'),
|
||||
pinch_icon: icon('#iD-walkthrough-pinch-apart', 'inline operation'),
|
||||
|
||||
// insert keys; may be localized and platform-dependent
|
||||
shift: uiCmd.display('⇧'),
|
||||
|
||||
@@ -338,7 +338,7 @@ export function uiIntroLine(context, reveal) {
|
||||
|
||||
timeout(function() {
|
||||
reveal('.entity-editor-pane',
|
||||
helpString('intro.lines.name_road', { button: icon('#iD-icon-close', 'pre-text') }),
|
||||
helpString('intro.lines.name_road', { button: icon('#iD-icon-close', 'inline') }),
|
||||
{ tooltipClass: 'intro-lines-name_road' }
|
||||
);
|
||||
}, 500);
|
||||
|
||||
@@ -356,7 +356,7 @@ export function uiIntroNavigation(context, reveal) {
|
||||
var href = d3_select(selector).attr('href') || '#iD-icon-close';
|
||||
|
||||
reveal('.entity-editor-pane',
|
||||
helpString('intro.navigation.close_townhall', { button: icon(href, 'pre-text') })
|
||||
helpString('intro.navigation.close_townhall', { button: icon(href, 'inline') })
|
||||
);
|
||||
|
||||
context.on('exit.intro', function() {
|
||||
@@ -369,7 +369,7 @@ export function uiIntroNavigation(context, reveal) {
|
||||
var href = d3_select(selector).attr('href') || '#iD-icon-close';
|
||||
|
||||
reveal('.entity-editor-pane',
|
||||
helpString('intro.navigation.close_townhall', { button: icon(href, 'pre-text') }),
|
||||
helpString('intro.navigation.close_townhall', { button: icon(href, 'inline') }),
|
||||
{ duration: 0 }
|
||||
);
|
||||
});
|
||||
@@ -493,7 +493,7 @@ export function uiIntroNavigation(context, reveal) {
|
||||
|
||||
reveal('.entity-editor-pane', helpString('intro.navigation.street_different_fields') + '{br}' +
|
||||
helpString('intro.navigation.editor_street', {
|
||||
button: icon(href, 'pre-text'),
|
||||
button: icon(href, 'inline'),
|
||||
field1: onewayField.label(),
|
||||
field2: maxspeedField.label()
|
||||
}));
|
||||
@@ -509,7 +509,7 @@ export function uiIntroNavigation(context, reveal) {
|
||||
|
||||
reveal('.entity-editor-pane', helpString('intro.navigation.street_different_fields') + '{br}' +
|
||||
helpString('intro.navigation.editor_street', {
|
||||
button: icon(href, 'pre-text'),
|
||||
button: icon(href, 'inline'),
|
||||
field1: onewayField.label(),
|
||||
field2: maxspeedField.label()
|
||||
}), { duration: 0 }
|
||||
|
||||
@@ -254,7 +254,7 @@ export function uiIntroPoint(context, reveal) {
|
||||
});
|
||||
|
||||
reveal('.entity-editor-pane',
|
||||
helpString('intro.points.add_close', { button: icon(href, 'pre-text') })
|
||||
helpString('intro.points.add_close', { button: icon(href, 'inline') })
|
||||
);
|
||||
|
||||
function continueTo(nextStep) {
|
||||
@@ -351,7 +351,7 @@ export function uiIntroPoint(context, reveal) {
|
||||
|
||||
timeout(function() {
|
||||
reveal('.entity-editor-pane',
|
||||
helpString('intro.points.update_close', { button: icon('#iD-icon-close', 'pre-text') })
|
||||
helpString('intro.points.update_close', { button: icon('#iD-icon-close', 'inline') })
|
||||
);
|
||||
}, 500);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user