diff options
author | zefanja <zefanja@freenet.de> | 2014-02-03 20:43:39 +0700 |
---|---|---|
committer | zefanja <zefanja@freenet.de> | 2014-02-03 20:43:39 +0700 |
commit | c83a3c2b743c3760fc1c47b1426f8b9bd292413a (patch) | |
tree | a80bd52c5ba8fa40806bd0fd534893685a4edd27 /source | |
parent | 6ba78145337594b1e118b25e887bb685681cc646 (diff) | |
download | biblez-ng-c83a3c2b743c3760fc1c47b1426f8b9bd292413a.tar.gz |
* moved font settings to menu
Diffstat (limited to 'source')
-rw-r--r-- | source/App.css | 4 | ||||
-rw-r--r-- | source/main.js | 20 | ||||
-rw-r--r-- | source/popup.js | 1 | ||||
-rw-r--r-- | source/settings.js | 4 |
4 files changed, 18 insertions, 11 deletions
diff --git a/source/App.css b/source/App.css index e1d047e..fcd3296 100644 --- a/source/App.css +++ b/source/App.css @@ -72,6 +72,10 @@ margin-left: 10px; } +.menu-item { + padding: 5px 10px; +} + .active-verse { background-color: yellow; transition: background-color 500ms linear; diff --git a/source/main.js b/source/main.js index ac8d98b..3fa1619 100644 --- a/source/main.js +++ b/source/main.js @@ -24,7 +24,7 @@ enyo.kind({ {name: "bcPopup", classes: "biblez-bc-popup", kind: "onyx.Popup", modal: true, floating: true, components: [ {kind: "biblez.bcSelector", name: "bcSelector", onSelect: "passageChanged", onBack: "closePopup"} ]}, - {kind: "onyx.MoreToolbar", showing: false, classes: "main-toolbar", name: "topTB", components: [ + {kind: "onyx.Toolbar", showing: false, classes: "main-toolbar", noStretch: true, name: "topTB", layoutKind: "FittableColumnsLayout", components: [ {name: "moduleSelector", kind: "onyx.MenuDecorator", onSelect: "moduleSelected", components: [ {kind: "onyx.Button", name: "btnModules", classes: "tb-button", style: "background-color: #934A15;"}, {kind: "onyx.Menu", maxHeight: "300", name: "moduleMenu"} @@ -39,7 +39,7 @@ enyo.kind({ {name: "actionSelector", kind: "onyx.MenuDecorator", onSelect: "actionSelected", components: [ {kind: "onyx.IconButton", src: "assets/menu.png"}, {kind: "onyx.Menu", name: "actionMenu", maxHeight: "300", style: "width: 200px;", components: [ - {action: "bookmarks", components: [ + {action: "bookmarks", classes: "menu-item", components: [ {kind: "onyx.IconButton", src: "assets/bookmarks.png"}, {content: $L("Bookmarks"), classes: "menu-label"} ]}, @@ -60,18 +60,18 @@ enyo.kind({ {kind: "onyx.IconButton", src: "assets/settings.png"}, {content: $L("Preferences"), classes: "menu-label"} ]}, + {action: "font", components: [ + {kind: "onyx.IconButton", src: "assets/font.png"}, + {content: $L("Font"), classes: "menu-label"} + ]}, + //{name: "btFont", kind: "onyx.Icon", src: "assets/font.png", style: "height: 28px;", ontap: "handleFontMenu"}, {action: "about", components: [ {kind: "onyx.IconButton", src: "assets/info.png"}, {content: $L("About"), classes: "menu-label"} ]} ]} ]}, - {name: "btFont", kind: "onyx.IconButton", src: "assets/font.png", ontap: "handleFontMenu"}, - //{name: "btnPrefs", kind:"onyx.IconButton", src: "assets/settings.png", ontap: "handlePrefs"}, - //{name: "plus", kind: "onyx.IconButton", src: "assets/add.png", style:"position:absolute;right:0;", ontap: "doOpenModuleManager"}, - /*{kind: "onyx.InputDecorator", components: [ - {kind: "onyx.Input", placeholder: "Enter a passage...", onchange: "handlePassage", name: "passageInput", value: "Matt 1"} - ]}*/ + //{name: "btFont", kind: "onyx.IconButton", src: "assets/font.png", ontap: "handleFontMenu"} ]}, {name: "mainPanel", kind: "Panels", index: 2, fit: true, ondragfinish: "handleChangeChapter", onTransitionStart: "handlePanelIndex", arrangerKind: "LeftRightArranger", margin: 0, classes: "background", components: [ {}, @@ -413,7 +413,7 @@ enyo.kind({ }, handleFontMenu: function (inSender, inEvent) { - this.$.fontMenu.showAtEvent(inEvent); + this.$.fontMenu.show(); }, handleFont: function (inSender, inEvent) { @@ -525,6 +525,8 @@ enyo.kind({ this.doOpenPreferences(); else if(inEvent.originator.action === "about") this.doOpenAbout(); + else if(inEvent.originator.action === "font") + this.handleFontMenu(); else this.doOpenDataView({section: inEvent.originator.action}); }, diff --git a/source/popup.js b/source/popup.js index 716ccb7..8ec6ab2 100644 --- a/source/popup.js +++ b/source/popup.js @@ -106,6 +106,7 @@ enyo.kind({ fontSize: 1.2, font: "default" }, + centered: true, components:[ {kind: "enyo.FittableRows", fit: true, components: [ {name: "fontSlider", kind: "onyx.Slider", value: 50, onChange: "sliderChanged", classes: "font-slider"}, diff --git a/source/settings.js b/source/settings.js index e23af33..5789d9a 100644 --- a/source/settings.js +++ b/source/settings.js @@ -43,13 +43,13 @@ enyo.kind({ ]}, {tag: "br"}, - /*{kind: "onyx.Groupbox", components: [ + {kind: "onyx.Groupbox", components: [ {kind: "onyx.GroupboxHeader", content: $L("Be careful!")}, {kind: "enyo.FittableRows", classes: "settings-row", components: [ {kind: "onyx.Button", content: "Delete all modules!", classes: "onyx-negative", style: "margin: 3px;", ontap: "deleteModules"}, {kind: "onyx.Button", content: "Delete all app data!", classes: "onyx-negative", style: "margin: 3px;", ontap: "deleteDatabases"} ]} - ]},*/ + ]}, ]} ]} |