add configuration UI for auto-hide feature in fullscreen mode

This commit is contained in:
Piro / SHIMODA Hiroshi 2011-01-10 16:00:00 +09:00
parent d71eb160da
commit 51108f6900
12 changed files with 65 additions and 80 deletions

View File

@ -296,18 +296,13 @@ function onSyncMaxTreeLevelPrefToUI(aTarget)
}
var gAutoHideModeRadio,
gAutoHideModeToggle,
gTabbarTransparencyScale,
var gTabbarTransparencyScale,
gTabbarTransparencyLabels;
function initAutoHidePane()
{
gAutoHideModeRadio = document.getElementById('extensions.treestyletab.tabbar.autoHide.mode-radio');
gAutoHideModeToggle = document.getElementById('extensions.treestyletab.tabbar.autoHide.mode.toggle');
gTabbarTransparencyScale = document.getElementById('tabbarTransparency-scale');
gTabbarTransparencyLabels = document.getElementById('tabbarTransparency-labels');
updateAutoHideModeLabel();
onTabbarTransparencyScaleChange();
syncEnabledState('extensions.treestyletab.tabbar.autoShow.mousemove-check', 'this.checked');
@ -315,29 +310,10 @@ function initAutoHidePane()
syncEnabledState('extensions.treestyletab.tabbar.autoShow.feedback-check', 'this.checked');
}
function onChangeAutoHideMode()
function onChangeAutoHideMode(aRadioGroup, aTogglePref)
{
if (!gAutoHideModeRadio) return;
var mode = gAutoHideModeRadio.value;
if (!mode) return;
if (gAutoHideModeRadio.value != 0) {
gAutoHideModeToggle.value = mode;
updateAutoHideModeLabel();
}
}
function updateAutoHideModeLabel()
{
if (!gAutoHideModeRadio) return;
var mode = gAutoHideModeRadio.value;
var nodes = document.getElementsByAttribute('label-mode'+mode, '*');
if (nodes && nodes.length)
Array.slice(nodes).forEach(function(aNode) {
var label = aNode.getAttribute('label-mode'+mode);
var node = document.getElementById(aNode.getAttribute('target'));
var attr = node.localName == 'label' ? 'value' : 'label' ;
node.setAttribute(attr, label);
});
if (aRadioGroup.value != 0)
document.getElementById(aTogglePref).value = aRadioGroup.value;
}
function onTabbarTransparencyScaleChange()

View File

@ -446,9 +446,15 @@
<preference id="extensions.treestyletab.tabbar.autoHide.mode"
name="extensions.treestyletab.tabbar.autoHide.mode"
type="int"/>
<preference id="extensions.treestyletab.tabbar.autoHide.mode.fullscreen"
name="extensions.treestyletab.tabbar.autoHide.mode.fullscreen"
type="int"/>
<preference id="extensions.treestyletab.tabbar.autoHide.mode.toggle"
name="extensions.treestyletab.tabbar.autoHide.mode.toggle"
type="int"/>
<preference id="extensions.treestyletab.tabbar.autoHide.mode.toggle.fullscreen"
name="extensions.treestyletab.tabbar.autoHide.mode.toggle.fullscreen"
type="int"/>
<preference id="extensions.treestyletab.tabbar.autoShow.mousemove"
name="extensions.treestyletab.tabbar.autoShow.mousemove"
type="bool"/>
@ -481,10 +487,22 @@
<vbox>
<groupbox orient="vertical">
<caption label="&config.autoHide.mode.normal.caption;"/>
<radiogroup orient="horizontal"
id="extensions.treestyletab.tabbar.autoHide.mode-radio"
preference="extensions.treestyletab.tabbar.autoHide.mode"
onselect="onChangeAutoHideMode()">
onselect="onChangeAutoHideMode(this, 'extensions.treestyletab.tabbar.autoHide.mode.toggle')">
<radio label="&config.autoHide.mode.0;" value="0"/>
<radio label="&config.autoHide.mode.2;" value="2"/>
<radio label="&config.autoHide.mode.1;" value="1"/>
</radiogroup>
</groupbox>
<groupbox orient="vertical">
<caption label="&config.autoHide.mode.fullscreen.caption;"/>
<radiogroup orient="horizontal"
id="extensions.treestyletab.tabbar.autoHide.mode.fullscreen-radio"
preference="extensions.treestyletab.tabbar.autoHide.mode.fullscreen"
onselect="onChangeAutoHideMode(this, 'extensions.treestyletab.tabbar.autoHide.mode.toggle.fullscreen')">
<radio label="&config.autoHide.mode.0;" value="0"/>
<radio label="&config.autoHide.mode.2;" value="2"/>
<radio label="&config.autoHide.mode.1;" value="1"/>
@ -495,7 +513,7 @@
<caption label="&config.autoShow.caption;"/>
<checkbox id="extensions.treestyletab.tabbar.autoShow.mousemove-check"
preference="extensions.treestyletab.tabbar.autoShow.mousemove"
label="&config.autoShow.mousemove.mode2;"
label="&config.autoShow.mousemove;"
oncommand="syncEnabledState(this, this.checked);"
sync-enabled-state-targets="
extensions.treestyletab.tabbar.autoHide.area-before
@ -508,25 +526,16 @@
<hbox align="center">
<spacer style="width:1em;"/>
<label id="extensions.treestyletab.tabbar.autoHide.area-before"
value="&config.autoHide.area.before.mode2;"
value="&config.autoHide.area.before;"
control="extensions.treestyletab.tabbar.autoHide.area-textbox"/>
<textbox id="extensions.treestyletab.tabbar.autoHide.area-textbox"
preference="extensions.treestyletab.tabbar.autoHide.area"
type="number"
min="0" increment="1" style="width:4em;"/>
<label id="extensions.treestyletab.tabbar.autoHide.area-after"
value="&config.autoHide.area.after.mode2;"
value="&config.autoHide.area.after;"
control="extensions.treestyletab.tabbar.autoHide.area-textbox"/>
</hbox>
<data target="extensions.treestyletab.tabbar.autoShow.mousemove-check"
label-mode1="&config.autoShow.mousemove;"
label-mode2="&config.autoShow.mousemove.mode2;"/>
<data target="extensions.treestyletab.tabbar.autoHide.area-before"
label-mode1="&config.autoHide.area.before;"
label-mode2="&config.autoHide.area.before.mode2;"/>
<data target="extensions.treestyletab.tabbar.autoHide.area-after"
label-mode1="&config.autoHide.area.after;"
label-mode2="&config.autoHide.area.after.mode2;"/>
<hbox align="center">
<spacer style="width:1em;"/>
<label id="extensions.treestyletab.tabbar.autoHide.delay-before"

View File

@ -71,16 +71,15 @@
<!ENTITY config.tabs.autohide "Platz sparen">
<!ENTITY config.autoHide.mode.normal.caption "for Normal Window Mode">
<!ENTITY config.autoHide.mode.fullscreen.caption "for Full Screen Mode">
<!ENTITY config.autoHide.mode.0 "Tableiste immer voll anzeigen">
<!ENTITY config.autoHide.mode.1 "Inaktive Tableiste verstecken">
<!ENTITY config.autoHide.mode.2 "Inaktive Tableiste verkleinert anzeigen">
<!ENTITY config.autoShow.caption "Tableiste aktivieren">
<!ENTITY config.autoShow.mousemove "Wenn der Mauszeiger die Fensterecken berührt">
<!ENTITY config.autoHide.area.before "Empfindlicher Bereich:">
<!ENTITY config.autoHide.area.after "Pixel rund um die Fensterecken">
<!ENTITY config.autoShow.mousemove.mode2 "Wenn der Mauszeiger die Fensterecken berührt">
<!ENTITY config.autoHide.area.before.mode2 "Empfindlicher Bereich:">
<!ENTITY config.autoHide.area.after.mode2 "Pixel rund um die Kante der Tableiste">
<!ENTITY config.autoHide.area.after "Pixel rund um die Fensterecken / Kante der Tableiste">
<!ENTITY config.autoHide.delay.before "Verzögerung:">
<!ENTITY config.autoHide.delay.after "msec.">
<!ENTITY config.autoShow.accelKeyDown "Wenn die Strg-Taste eine Zeit lang gedrückt wird">

View File

@ -71,16 +71,15 @@
<!ENTITY config.tabs.autohide "Auto hide">
<!ENTITY config.autoHide.mode.normal.caption "for Normal Window Mode">
<!ENTITY config.autoHide.mode.fullscreen.caption "for Full Screen Mode">
<!ENTITY config.autoHide.mode.0 "Show tab bar always">
<!ENTITY config.autoHide.mode.1 "Auto Hide tab bar">
<!ENTITY config.autoHide.mode.2 "Auto Shrink tab bar">
<!ENTITY config.autoShow.caption "Show tab bar automatically when">
<!ENTITY config.autoShow.mousemove "Mouse cursor is close to the window edge">
<!ENTITY config.autoShow.mousemove "Mouse cursor is close to the edge of window or tab bar">
<!ENTITY config.autoHide.area.before "Sensitive area:">
<!ENTITY config.autoHide.area.after "pixels from window edges">
<!ENTITY config.autoShow.mousemove.mode2 "Mouse cursor is close to the tab bar's edge">
<!ENTITY config.autoHide.area.before.mode2 "Sensitive area:">
<!ENTITY config.autoHide.area.after.mode2 "pixels from tab bar's edge">
<!ENTITY config.autoHide.area.after "pixels from edges of window or tab bar">
<!ENTITY config.autoHide.delay.before "Delay:">
<!ENTITY config.autoHide.delay.after "msec.">
<!ENTITY config.autoShow.accelKeyDown "Control key is pressed a while">

View File

@ -73,16 +73,15 @@
<!ENTITY config.tabs.autohide "Auto ocultar">
<!ENTITY config.autoHide.mode.normal.caption "for Normal Window Mode">
<!ENTITY config.autoHide.mode.fullscreen.caption "for Full Screen Mode">
<!ENTITY config.autoHide.mode.0 "Mostrar la barra de pestañas siempre">
<!ENTITY config.autoHide.mode.1 "Auto-ocultar la barra de pestañas">
<!ENTITY config.autoHide.mode.2 "Auto Shrink tab bar">
<!ENTITY config.autoShow.caption "Mostrar la barra de pestañas automáticamente cuando">
<!ENTITY config.autoShow.mousemove "Al acercar el mouse a los bordes de la ventana">
<!ENTITY config.autoShow.mousemove "Al acercar el mouse a los bordes de la ventana / barra de pestañas">
<!ENTITY config.autoHide.area.before "Área sensible:">
<!ENTITY config.autoHide.area.after "píxeles del borde de la ventana">
<!ENTITY config.autoShow.mousemove.mode2 "Al acercar el mouse a los bordes de la barra de pestañas">
<!ENTITY config.autoHide.area.before.mode2 "Área sensible:">
<!ENTITY config.autoHide.area.after.mode2 "píxeles desde el borde de la barra de pestañas">
<!ENTITY config.autoHide.area.after "píxeles del borde de la ventana / barra de pestañas">
<!ENTITY config.autoHide.delay.before "Retraso:">
<!ENTITY config.autoHide.delay.after "mseg.">
<!ENTITY config.autoShow.accelKeyDown "Mientras la tecla Control es presionada por un instante">

View File

@ -71,16 +71,15 @@
<!ENTITY config.tabs.autohide "Masquage automatique">
<!ENTITY config.autoHide.mode.normal.caption "for Normal Window Mode">
<!ENTITY config.autoHide.mode.fullscreen.caption "for Full Screen Mode">
<!ENTITY config.autoHide.mode.0 "Toujours afficher le panneau des onglets">
<!ENTITY config.autoHide.mode.1 "Masquer automatiquement le panneau des onglets">
<!ENTITY config.autoHide.mode.2 "Rétrecir automatiquement le panneau des onglets">
<!ENTITY config.autoShow.caption "Afficher le panneau des onglets lorsque">
<!ENTITY config.autoShow.mousemove "La souris est proche du bord de la fenêtre">
<!ENTITY config.autoShow.mousemove "La souris est proche du bord de la fenêtre / du panneau des onglets">
<!ENTITY config.autoHide.area.before "Zone sensible :">
<!ENTITY config.autoHide.area.after "pixels des bords de la fenêtre">
<!ENTITY config.autoShow.mousemove.mode2 "La souris est proche du bord du panneau des onglets">
<!ENTITY config.autoHide.area.before.mode2 "Zone sensible :">
<!ENTITY config.autoHide.area.after.mode2 "pixels du bord du panneau des onglets">
<!ENTITY config.autoHide.area.after "pixels des bords de la fenêtre / du panneau des onglets">
<!ENTITY config.autoHide.delay.before "Délai :">
<!ENTITY config.autoHide.delay.after "msec.">
<!ENTITY config.autoShow.accelKeyDown "La touche Control est appuyée pendant un moment">

View File

@ -73,16 +73,15 @@
<!ENTITY config.tabs.autohide "Visualizzazione">
<!ENTITY config.autoHide.mode.normal.caption "for Normal Window Mode">
<!ENTITY config.autoHide.mode.fullscreen.caption "for Full Screen Mode">
<!ENTITY config.autoHide.mode.0 "Mostra sempre la barra delle schede">
<!ENTITY config.autoHide.mode.1 "Nascondi automaticamente la barra delle schede">
<!ENTITY config.autoHide.mode.2 "Riduci automaticamente la barra delle schede">
<!ENTITY config.autoShow.caption "Visualizza la barra della schede quando">
<!ENTITY config.autoShow.mousemove "Viene spostato il mouse in prossimità del bordo della finestra">
<!ENTITY config.autoShow.mousemove "Viene spostato il mouse in prossimità del bordo della finestra / barra delle schede">
<!ENTITY config.autoHide.area.before "Area di attivazione:">
<!ENTITY config.autoHide.area.after "distanza dai bordi della finestra (in pixel)">
<!ENTITY config.autoShow.mousemove.mode2 "Viene spostato il mouse in prossimità del bordo della barra delle schede">
<!ENTITY config.autoHide.area.before.mode2 "Area di attivazione:">
<!ENTITY config.autoHide.area.after.mode2 "distanza dai bordi della barra delle schede (in pixel)">
<!ENTITY config.autoHide.area.after "distanza dai bordi della finestra / barra delle schede (in pixel)">
<!ENTITY config.autoHide.delay.before "Ritardo:">
<!ENTITY config.autoHide.delay.after "msec.">
<!ENTITY config.autoShow.accelKeyDown "Viene tenuto premuto il tasto Control">

View File

@ -71,16 +71,15 @@
<!ENTITY config.tabs.autohide "自動的に隠す">
<!ENTITY config.autoHide.mode.normal.caption "通常のウィンドウ表示の時">
<!ENTITY config.autoHide.mode.fullscreen.caption "フルスクリーン表示の時">
<!ENTITY config.autoHide.mode.0 "常にタブバーを表示する">
<!ENTITY config.autoHide.mode.1 "タブバーを自動的に隠す">
<!ENTITY config.autoHide.mode.2 "タブバーを自動的に縮める">
<!ENTITY config.autoShow.caption "以下の場合に自動的にタブバーを表示する">
<!ENTITY config.autoShow.mousemove "ウィンドウの端にポインタが近づいた時">
<!ENTITY config.autoHide.area.before "反応する領域:ウィンドウの端から">
<!ENTITY config.autoShow.mousemove "タブバーとの境界またはウィンドウの端にポインタが近づいた時">
<!ENTITY config.autoHide.area.before "反応する領域:タブバーとの境界またはウィンドウの端から">
<!ENTITY config.autoHide.area.after "ピクセルの範囲">
<!ENTITY config.autoShow.mousemove.mode2 "タブバーとの境界にポインタが近づいた時">
<!ENTITY config.autoHide.area.before.mode2 "反応する領域:タブバーとの境界から">
<!ENTITY config.autoHide.area.after.mode2 "ピクセルの範囲">
<!ENTITY config.autoHide.delay.before "遅延:">
<!ENTITY config.autoHide.delay.after "ミリ秒">
<!ENTITY config.autoShow.accelKeyDown "Controlキーを長押しした時">

View File

@ -68,16 +68,15 @@
<!ENTITY config.tabs.autohide "Ukrywanie">
<!ENTITY config.autoHide.mode.normal.caption "for Normal Window Mode">
<!ENTITY config.autoHide.mode.fullscreen.caption "for Full Screen Mode">
<!ENTITY config.autoHide.mode.0 "Zawsze wyświetlaj pasek kart">
<!ENTITY config.autoHide.mode.1 "Ukrywaj pasek kart">
<!ENTITY config.autoHide.mode.2 "Zmniejszaj pasek kart">
<!ENTITY config.autoShow.caption "Automatycznie wyświetlaj pasek kart po:">
<!ENTITY config.autoShow.mousemove "Umieszczeniu kursora myszy w pobliżu krawędzi okna">
<!ENTITY config.autoShow.mousemove "Umieszczeniu kursora myszy w pobliżu krawędzi okna / paska kart">
<!ENTITY config.autoHide.area.before "Strefa czułości:">
<!ENTITY config.autoHide.area.after "pikseli od krawędzi okna">
<!ENTITY config.autoShow.mousemove.mode2 "Umieszczeniu kursora myszy w pobliżu krawędzi paska kart">
<!ENTITY config.autoHide.area.before.mode2 "Strefa czułości:">
<!ENTITY config.autoHide.area.after.mode2 "pikseli od krawędzi paska kart">
<!ENTITY config.autoHide.area.after "pikseli od krawędzi okna / paska kart">
<!ENTITY config.autoHide.delay.before "Opóźnienie:">
<!ENTITY config.autoHide.delay.after "ms">
<!ENTITY config.autoShow.accelKeyDown "Naciśnięciu i przytrzymaniu klawisza [Ctrl]">

View File

@ -71,16 +71,15 @@
<!ENTITY config.tabs.autohide "Автоскрытие/показ панели">
<!ENTITY config.autoHide.mode.normal.caption "for Normal Window Mode">
<!ENTITY config.autoHide.mode.fullscreen.caption "for Full Screen Mode">
<!ENTITY config.autoHide.mode.0 "Показывать панель вкладок всегда">
<!ENTITY config.autoHide.mode.1 "Автоскрытие панели вкладок">
<!ENTITY config.autoHide.mode.2 "Автосжатие панели вкладок">
<!ENTITY config.autoShow.caption "Автоматически показывать панель вкладок при">
<!ENTITY config.autoShow.mousemove "Перемещении мышки к краю окна">
<!ENTITY config.autoShow.mousemove "Перемещении мышки к краю окна / панели вкладок">
<!ENTITY config.autoHide.area.before "Область срабатывания:">
<!ENTITY config.autoHide.area.after "пикселов от края окна">
<!ENTITY config.autoShow.mousemove.mode2 "Перемещении мышки к краю панели вкладок">
<!ENTITY config.autoHide.area.before.mode2 "Область срабатывания:">
<!ENTITY config.autoHide.area.after.mode2 "пикселов от края панели вкладок">
<!ENTITY config.autoHide.area.after "пикселов от края окна / панели вкладок">
<!ENTITY config.autoHide.delay.before "Задержка:">
<!ENTITY config.autoHide.delay.after "мсек.">
<!ENTITY config.autoShow.accelKeyDown "Нажати и удержания кнопки Ctrl">

View File

@ -71,6 +71,8 @@
<!ENTITY config.tabs.autohide "自动隐藏">
<!ENTITY config.autoHide.mode.normal.caption "for Normal Window Mode">
<!ENTITY config.autoHide.mode.fullscreen.caption "for Full Screen Mode">
<!ENTITY config.autoHide.mode.0 "一直显示标签栏">
<!ENTITY config.autoHide.mode.1 "自动隐藏标签栏">
<!ENTITY config.autoHide.mode.2 "自动缩小标签栏">
@ -78,9 +80,11 @@
<!ENTITY config.autoShow.mousemove "鼠标指针在窗口边缘时">
<!ENTITY config.autoHide.area.before "触发区域:">
<!ENTITY config.autoHide.area.after "像素(距离窗口边缘)">
<!--
<!ENTITY config.autoShow.mousemove.mode2 "鼠标指针移到标签栏边缘">
<!ENTITY config.autoHide.area.before.mode2 "触发区域:">
<!ENTITY config.autoHide.area.after.mode2 "像素(距离标签栏边缘)">
-->
<!ENTITY config.autoHide.delay.before "延迟:">
<!ENTITY config.autoHide.delay.after "毫秒">
<!ENTITY config.autoShow.accelKeyDown "按下Ctrl键之后">

View File

@ -73,6 +73,8 @@
<!ENTITY config.tabs.autohide "自動隱藏">
<!ENTITY config.autoHide.mode.normal.caption "for Normal Window Mode">
<!ENTITY config.autoHide.mode.fullscreen.caption "for Full Screen Mode">
<!ENTITY config.autoHide.mode.0 "永遠顯示分頁工具列">
<!ENTITY config.autoHide.mode.1 "自動隱藏分頁工具列">
<!ENTITY config.autoHide.mode.2 "自動縮小分頁工具列">
@ -80,9 +82,11 @@
<!ENTITY config.autoShow.mousemove "滑鼠指標指向視窗邊緣時">
<!ENTITY config.autoHide.area.before "起反應的區域:距離視窗邊緣">
<!ENTITY config.autoHide.area.after "個像素的範圍">
<!--
<!ENTITY config.autoShow.mousemove.mode2 "滑鼠指標指在分頁工具列邊緣">
<!ENTITY config.autoHide.area.before.mode2 "感應區:">
<!ENTITY config.autoHide.area.after.mode2 "像素(距分頁工具列內緣)">
-->
<!ENTITY config.autoHide.delay.before "延遲:">
<!ENTITY config.autoHide.delay.after "毫秒">
<!ENTITY config.autoShow.accelKeyDown "按下 Ctrl一段時間後">