Commit 0aa1c5ed authored by Troy A. Griffitts's avatar Troy A. Griffitts

Updated slidemenu styles to adjust better to dynamic font selection

Updated pt locale from Frei Hermano. Thank you!
parent 505281ba
......@@ -142,7 +142,7 @@ Word Study requires a Greek and Hebrew Strongs dictionary. Please install one o
Theme=Estilo
Light=Claro
Dark=Escuro
Show Gospel Parallels=Mostrar Evangelhos Sinópticos
Show Gospel Parallels=Textos paralelos nos Evangelhos
# Esta opção é usada para Estudo da Bíblia, para Estudo do Versículo, Estudo da Palavra, etc.
# Primeira Ativa significa que a Bíblia escolhida como Bíblia de Estudo é a primeira da lista.
# Esta opção significa, "Eu não quero usar uma Bíblia específica; serve a que está agora seleccionada."
......@@ -157,7 +157,7 @@ Installation Sources=Fontes de Instalação
Updates Available=Atualizações disponíveis
No installed resources have updates available. New study resources can be added by first selecting an installation source at the top.=Não há atualizações disponíveis para os seus recursos instalados. Novos materiais de estudo podem ser adicionados seleccionando uma fonte ou origem de instalação no topo.
Below is a list of installed resources which have updates available. Click on any row to update the resource.=Abaixo encontrará uma lista de recursos instalados que têm atualizações disponíveis. Carregue em qualquer uma das linhas para atualizar o recurso.
You have asked to show Gospel parallels. For this feature, we need to download a small set of data. Is this OK?=Você pediu para visualizar os textos paralelos dos Evangelhos. Para que isso seja possível, precisamos de descarregar uma pequena quantidade de dados. Concorda?
You have asked to show Gospel parallels. For this feature, we need to download a small set of data. Is this OK?=Você pediu para visualizar os textos paralelos nos Evangelhos. Para que isso seja possível, precisamos de descarregar uma pequena quantidade de dados. Concorda?
Install Module=Instalar Módulo
Font: Reading=Fonte: Textos
Font: App=Fonte: Aplicação
......
......@@ -162,6 +162,22 @@ body,td,div,span,p,.verse,.currentVerse {
transform: translateY(-6em);
transition: transform 250ms ease-in-out;
}
.topBarBandItem {
display: table-cell;
vertical-align: middle;
height: 100%;
padding-left: .4em;
padding-right: .4em;
}
.subMenuItem {
margin-left: 2em;
margin-right: .25em;
padding-bottom:.5em;
line-height:initial;
}
.openTopBar:checked ~ #topBarBand {
transform: translateY(0);
}
......@@ -194,7 +210,7 @@ body,td,div,span,p,.verse,.currentVerse {
.menupanel {
height:100%;
top:0px;
width:16em;
width:17em;
float:left;
margin-top: 3em;
margin-top: calc(constant(safe-area-inset-top) + 3em);
......@@ -204,7 +220,7 @@ body,td,div,span,p,.verse,.currentVerse {
left: 0;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
transform: translateX(-16em);
transform: translateX(-17em);
transition: transform 250ms ease-in-out;
opacity:0.90;
z-index:5;
......
......@@ -310,10 +310,10 @@ console.log("*** in show. main.length: " + main.length);
t += '<div id="textDisplay"></div>';
t += '<input type="checkbox" class="openTopBar" id="openTopBar">';
t += '<div id="topBarBand" class="topBarBand appText">';
t += '<div style="display:table-cell;width:3.8em;height:100%;vertical-align:middle;padding-right:.2em;padding-bottom:.4em;">&nbsp;</div>';
t += '<div style="display:table-cell;padding-left:.2em;height:100%;vertical-align:middle;padding-right:.2em;padding-bottom:.4em;" id="keyDisplay" onclick="app.closeMenu();app.closeTopBar(); app.selectKey(); return false;">&nbsp;</div>';
t += '<div style="display:table-cell;padding-right:1.5em;padding-top:.2em;" onclick="app.shareVerse(); return false;"><img style="height:2.3em;opacity:0.80;" src="img/ic_action_share.png"/></div>';
t += '<div style="display:table-cell;color:white;padding-left:.3em;padding-right:.4em;height:100%;vertical-align:middle;padding-bottom:.4em;font-size: 175%;" class="notesButton">✎</div>';
t += '<div class="topBarBandItem" style="width:3.8em;padding-right:.2em;">&nbsp;</div>';
t += '<div class="topBarBandItem" id="keyDisplay" onclick="app.closeMenu();app.closeTopBar(); app.selectKey(); return false;">&nbsp;</div>';
t += '<div class="topBarBandItem" style="padding-top:.35em;" onclick="app.shareVerse(); return false;"><img style="height:2.3em;opacity:0.80;" src="img/ic_action_share.png"/></div>';
t += '<div class="topBarBandItem" style="color:white;font-size: 200%;" class="notesButton">✎</div>';
t += '</div>';
t += '<input type="checkbox" class="openSidebarMenu" id="openSidebarMenu">';
t += '<label for="openSidebarMenu" class="sidebarIconToggle">';
......@@ -643,6 +643,10 @@ console.log('*********** Initially setting locale to: ' + localeName);
});
}
// discover OS default font
var defaultFontName = app.getDefaultFontFamily();
if (app.fonts.indexOf(defaultFontName) < 0) app.fonts.splice(0, 0, defaultFontName+'|'+defaultFontName);
var installBundledResources = function(callback) {
app.copyBundledResources('', '', function() {
// since we currently just nuke any top-level bundled resource folder, we can do this for mods.d/
......@@ -1043,10 +1047,10 @@ console.log('Installed module: ' + mods[i].name + '; features.length: ' + mods[i
// View Selector
if (app.enableViewTypes) {
t += '<tr><td class="menuLabel" onclick="app.toggleViewSelector(); return false;"><img src="img/ic_action_settings.png" style="height:1em;"/> <span id="viewLabel" data-english="View">View</span>: <span style="font-size:70%;" id="mainViewType">' + app.mainViewType + '</span></td></tr>';
t += '<tr><td style="width:100%;"><div style="padding-left:1em;" class="viewSelectorPanel toshow">';
t += '<div><input type="radio" id="viewBibles" name="viewSelector" value="Bibles" onclick="app.setViewBibles();return false;"/> <label id="viewBiblesLabel" data-english="Bibles" for="viewBibles">Bibles</label></div>';
t += '<div><input type="radio" id="viewLanguageAssist" name="viewSelector" value="Language Assist" onclick="app.setViewLanguageAssist();return false;"/> <label id="viewLALabel" data-english="Language Assist" for="viewLanguageAssist">Language Assist</label></div>';
t += '<div><input type="radio" id="viewCommentaryAssist" name="viewSelector" value="Commentary Assist" onclick="app.setViewCommentaryAssist();return false;"/> <label id="viewCALabel" data-english="Commentary Assist" for="viewCommentaryAssist">Commentary Assist</label></div>';
t += '<tr><td style="width:100%;"><div class="viewSelectorPanel toshow">';
t += '<div class="subMenuItem"><input type="radio" id="viewBibles" name="viewSelector" value="Bibles" onclick="app.setViewBibles();return false;"/> <label id="viewBiblesLabel" data-english="Bibles" for="viewBibles">Bibles</label></div>';
t += '<div class="subMenuItem"><input type="radio" id="viewLanguageAssist" name="viewSelector" value="Language Assist" onclick="app.setViewLanguageAssist();return false;"/> <label id="viewLALabel" data-english="Language Assist" for="viewLanguageAssist">Language Assist</label></div>';
t += '<div class="subMenuItem"><input type="radio" id="viewCommentaryAssist" name="viewSelector" value="Commentary Assist" onclick="app.setViewCommentaryAssist();return false;"/> <label id="viewCALabel" data-english="Commentary Assist" for="viewCommentaryAssist">Commentary Assist</label></div>';
t += '</div></td></tr>';
}
......@@ -1090,26 +1094,26 @@ console.log('Installed module: ' + mods[i].name + '; features.length: ' + mods[i
// Settings
t += '<tr><td class="menuLabel" onclick="app.toggleSettings(); return false;"><img src="img/ic_action_settings.png" style="height:1em;"/> <span data-english="Settings">Settings</span></td></tr>';
t += '<tr><td style="width:100%;"><div class="settingsPanel toshow">';
t += '<div style="padding-bottom:.5em;line-height:initial;">&nbsp;&nbsp;&nbsp;&nbsp;<span data-english="Word Study Bible">Word Study Bible</span><br/>&nbsp;&nbsp;&nbsp;&nbsp;<select style="width:15em;" onchange="app.setWordStudyBible($(this).val()); return false;" id="wordStudyBible"></select></div>';
t += '<div class="subMenuItem"><span data-english="Word Study Bible">Word Study Bible</span><br/><select style="width:100%;" onchange="app.setWordStudyBible($(this).val()); return false;" id="wordStudyBible"></select></div>';
if (app.enableGospelParallels) {
t += '<div style="padding-bottom:.5em;line-height:initial;"><div style="display:inline-block;">&nbsp;&nbsp;&nbsp;&nbsp;<span data-english="Show Gospel Parallels">Show Gospel Parallels</span></div><label style="float:right;" class="switch"><input id="gospelParallelsSwitch" onchange="app.toggleGospelParallels(); return false;" type="checkbox"><span class="slider round"></span></label></div>';
t += '<div class="subMenuItem" style="margin-right:0"><span data-english="Show Gospel Parallels">Show Gospel Parallels</span><label style="float:right;" class="switch"><input id="gospelParallelsSwitch" onchange="app.toggleGospelParallels(); return false;" type="checkbox"><span class="slider round"></span></label></div>';
}
t += '<div style="padding-bottom:.5em;line-height:initial;">&nbsp;&nbsp;&nbsp;&nbsp;<span data-english="Language">Language</span><br/>&nbsp;&nbsp;&nbsp;&nbsp;<select style="width:15em;" onchange="app.setAppLocale($(this).val()); return false;" id="appLocale"></select></div>';
t += '<div style="padding-bottom:.5em;line-height:initial;">&nbsp;&nbsp;&nbsp;&nbsp;<button id="decreaseUIFontButton" onclick="app.decreaseUIFont();return false;" style="width:2em;font-size:130%"> - </button>&nbsp; <span data-english="Font Size">Font Size</span> &nbsp;<button id="increaseUIFontButton" onclick="app.increaseUIFont();return false;" style="width:2em;font-size:130%"> + </button></div>';
t += '<div style="padding-bottom:.5em;line-height:initial;">&nbsp;&nbsp;&nbsp;&nbsp;<span data-english="Theme">Theme</span><br/>&nbsp;&nbsp;&nbsp;&nbsp;<select style="width:15em;" onchange="app.setAppTheme($(this).val()); return false;" id="appTheme"></select></div>';
t += '<div style="padding-bottom:.5em;line-height:initial;">&nbsp;&nbsp;&nbsp;&nbsp;<span data-english="Font: Reading">Font: Reading</span><br/>&nbsp;&nbsp;&nbsp;&nbsp;<select style="width:15em;" onchange="app.setFontReading($(this).val()); return false;" id="fontReading"></select></div>';
t += '<div style="padding-bottom:.5em;line-height:initial;">&nbsp;&nbsp;&nbsp;&nbsp;<span data-english="Font: App">Font: App</span><br/>&nbsp;&nbsp;&nbsp;&nbsp;<select style="width:15em;" onchange="app.setFontApp($(this).val()); return false;" id="fontApp"></select></div>';
t += '<div class="subMenuItem" style="clear:both;"><span data-english="Language">Language</span><br/><select style="width:100%;" onchange="app.setAppLocale($(this).val()); return false;" id="appLocale"></select></div>';
t += '<div class="subMenuItem"><button id="decreaseUIFontButton" onclick="app.decreaseUIFont();return false;" style="float:left;width:2em;font-size:130%"> - </button><button id="increaseUIFontButton" onclick="app.increaseUIFont();return false;" style="float:right;width:2em;font-size:130%"> + </button><div style="text-align:center;data-english="Font Size">Font Size</div></div>';
t += '<div class="subMenuItem" style="clear:both;"><span data-english="Theme">Theme</span><br/><select style="width:100%;" onchange="app.setAppTheme($(this).val()); return false;" id="appTheme"></select></div>';
t += '<div class="subMenuItem"><span data-english="Font: Reading">Font: Reading</span><br/><select style="width:100%;" onchange="app.setFontReading($(this).val()); return false;" id="fontReading"></select></div>';
t += '<div class="subMenuItem"><span data-english="Font: App">Font: App</span><br/><select style="width:100%;" onchange="app.setFontApp($(this).val()); return false;" id="fontApp"></select></div>';
if (app.enableBibleSync) {
t += '<div style="padding-bottom:.5em;line-height:initial;">&nbsp;&nbsp;&nbsp;&nbsp;<span data-english="BibleSync User">BibleSync User</span><br/>&nbsp;&nbsp;&nbsp;&nbsp;<input style="width:15em;" onchange="app.setBibleSyncUserName($(this).val()); return false;" id="bibleSyncUserName"/></div>';
t += '<div style="padding-bottom:.5em;line-height:initial;">&nbsp;&nbsp;&nbsp;&nbsp;<span data-english="BibleSync Passphrase">BibleSync Passphrase</span><br/>&nbsp;&nbsp;&nbsp;&nbsp;<input style="width:15em;" onchange="app.setBibleSyncPassphrase($(this).val()); return false;" id="bibleSyncPassphrase"/></div>';
t += '<div class="subMenuItem"><span data-english="BibleSync User">BibleSync User</span><br/><input style="width:99%;" onchange="app.setBibleSyncUserName($(this).val()); return false;" id="bibleSyncUserName"/></div>';
t += '<div class="subMenuItem"><span data-english="BibleSync Passphrase">BibleSync Passphrase</span><br/><input style="width:99%;" onchange="app.setBibleSyncPassphrase($(this).val()); return false;" id="bibleSyncPassphrase"/></div>';
}
t += '</div></td></tr>';
// About
t += '<tr class="menuLabel" onclick="app.closeMenu(); app.about();return false;"><td><img src="img/ic_action_about.png" style="height:1em;"/> <span data-english="About">About</span></td></tr>';
t += '<tr class="menuLabel" onclick="app.closeMenu(); app.about();return false;"><td style="padding-left:.3em; padding-bottom:.7em;border-top:1px dotted grey;font-size:75%;font-style:italic;text-align:left;"> <span>'+app.appName+'</span> '+app.version+'</td></tr>';
t += '<tr class="menuLabel"><td>&nbsp</td></tr>';
t += '<tr class="menuLabel"><td>&nbsp</td></tr>';
t += '<tr class="menuLabel"><td>&nbsp;</td></tr>';
t += '<tr class="menuLabel"><td>&nbsp;</td></tr>';
t += '</tbody></table>';
$('.menupanel').html(t);
$('.menutab').click(function(){
......@@ -2058,5 +2062,27 @@ console.log('Setting tr key '+trKey+' to: ' + translated);
}
else setHTMLControls();
});
},
getElementFontFamily: function(element) {
var fontFamily = window.getComputedStyle(element, null).getPropertyValue('font-family');
fontFamily = fontFamily.replace(/"/g, '');
return fontFamily;
},
/**
* Returns default font-family
*/
getDefaultFontFamily: function() {
var iframe = document.createElement('iframe');
var htmlElement;
var fontFamily;
document.body.appendChild(iframe);
htmlElement = iframe.contentDocument.documentElement;
fontFamily = app.getElementFontFamily(htmlElement);
document.body.removeChild(iframe);
return fontFamily;
}
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment