Skip to content

Commit

Permalink
[BUG #6233] Shifted inspector to use the indigo theme.
Browse files Browse the repository at this point in the history
  • Loading branch information
wittemann committed Mar 21, 2012
1 parent ab68ac7 commit 9553b4c
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 45 deletions.
Expand Up @@ -32,7 +32,6 @@ qx.Class.define("inspector.components.AbstractView",

// Creats the toolbar
this._toolbar = new qx.ui.toolbar.ToolBar();
this._toolbar.setAppearance("objects-toolbar");
this._toolbar._getLayout().setAlignY("middle");
this.add(this._toolbar);
},
Expand Down
Expand Up @@ -53,7 +53,7 @@ qx.Class.define("inspector.console.ConsoleView",

// inputfield
var inputComposite = new qx.ui.container.Composite();
inputComposite.setDecorator("input");
inputComposite.setDecorator("inset");
var layout = new qx.ui.layout.HBox();
layout.setAlignY("middle");
inputComposite.setLayout(layout);
Expand Down
41 changes: 30 additions & 11 deletions component/inspector/source/class/inspector/selenium/View.js
Expand Up @@ -82,8 +82,11 @@ qx.Class.define("inspector.selenium.View", {
var part2 = this.__getToolbarPart2();
part2.setEnabled(false);
this._toolbar.add(part2);
var part3 = this.__getToolbarPart3();
part3.setEnabled(false);
this._toolbar.add(part3);
this._toolbar.addSpacer();
this._toolbar.add(this.__getToolbarPart3());
this._toolbar.add(this.__getToolbarPart4());

// Options window
this._optionsWindow = new inspector.selenium.OptionsWindow("Selenium Options", null, this);
Expand Down Expand Up @@ -204,8 +207,7 @@ qx.Class.define("inspector.selenium.View", {
},

/**
* Creates the toolbar part containing the speed slider and the run, record
* and export buttons
* Creates the toolbar part containing the speed slider
*
* @return {qx.ui.toolbar.Part}
*/
Expand Down Expand Up @@ -239,14 +241,28 @@ qx.Class.define("inspector.selenium.View", {
};
this._speedSlider.bind("value", speedLabel, "value", options);

return part2;
},


/**
* Creates the toolbar part containing the run, record
* and export buttons
*
* @return {qx.ui.toolbar.Part}
*/
__getToolbarPart3 : function()
{
var part3 = new qx.ui.toolbar.Part();

var runCmdButton = new qx.ui.toolbar.Button(null, "icon/22/actions/media-playback-start.png");
part2.add(runCmdButton)
part3.add(runCmdButton)
runCmdButton.addListener("execute", this.runSeleniumCommands, this);
runCmdButton.setToolTipText("Run selected command(s)");

this._recordButton = new qx.ui.toolbar.CheckBox(null,
"icon/22/actions/media-record.png");
part2.add(this._recordButton);
part3.add(this._recordButton);
var recOpts = {
converter : function(data) {
return data ? "Stop adding commands for inspected widgets" :
Expand All @@ -256,33 +272,34 @@ qx.Class.define("inspector.selenium.View", {
this._recordButton.bind("value", this._recordButton, "toolTipText", recOpts);

this._exportButton = new qx.ui.toolbar.CheckBox(null, "icon/22/actions/window-new.png");
part2.add(this._exportButton);
part3.add(this._exportButton);
this._exportButton.setToolTipText("Import/export Selenese");
this._exportButton.addListenerOnce("changeValue", function(ev) {
this.__getSelenese();
}, this);

return part2;
return part3;
},


/**
* Creates the toolbar part containing the options button
*
* @return {qx.ui.toolbar.Part}
*/
__getToolbarPart3 : function()
__getToolbarPart4 : function()
{
var part3 = new qx.ui.toolbar.Part();
var part4 = new qx.ui.toolbar.Part();
this._optionsButton = new qx.ui.toolbar.Button(null, "icon/22/categories/system.png");
this._optionsButton.setToolTipText("Options");
part3.add(this._optionsButton);
part4.add(this._optionsButton);
this._optionsButton.addListener("execute", function(ev) {
if (!this._optionsWindow.isVisible()) {
this._optionsWindow.open();
}
}, this);

return part3;
return part4;
},

/**
Expand Down Expand Up @@ -645,6 +662,7 @@ qx.Class.define("inspector.selenium.View", {

this._toolbar.getChildren()[0].setEnabled(false);
this._toolbar.getChildren()[1].setEnabled(false);
this._toolbar.getChildren()[2].setEnabled(false);

if (window.Selenium) {
window.Selenium = null;
Expand Down Expand Up @@ -736,6 +754,7 @@ qx.Class.define("inspector.selenium.View", {
qx.bom.Cookie.set("coreScripts", this.getSeleniumScripts(), 365);
this._toolbar.getChildren()[0].setEnabled(true);
this._toolbar.getChildren()[1].setEnabled(true);
this._toolbar.getChildren()[2].setEnabled(true);
this.__availableCommands = this.getAvailableCommands();
}

Expand Down
28 changes: 13 additions & 15 deletions component/inspector/source/class/inspector/theme/Appearance.js
Expand Up @@ -10,10 +10,22 @@

qx.Theme.define("inspector.theme.Appearance",
{
extend : qx.theme.modern.Appearance,
extend : qx.theme.indigo.Appearance,

appearances :
{
"toolbar" :
{
style : function(states)
{
return {
padding: [0, 0],
backgroundColor: "light-background"
};
}
},


"toolbar-button-bold" :
{
alias : "toolbar-button",
Expand Down Expand Up @@ -49,20 +61,6 @@ qx.Theme.define("inspector.theme.Appearance",
* Objects Window
*/

"objects-toolbar" :
{
alias : "toolbar",
include : "toolbar",

style : function(states)
{
return {
paddingLeft : 3,
paddingRight : 3
};
}
},

"objects-textfield" :
{
alias : "textfield",
Expand Down
2 changes: 1 addition & 1 deletion component/inspector/source/class/inspector/theme/Color.js
Expand Up @@ -10,7 +10,7 @@

qx.Theme.define("inspector.theme.Color",
{
extend : qx.theme.modern.Color,
extend : qx.theme.indigo.Color,

colors :
{
Expand Down
14 changes: 1 addition & 13 deletions component/inspector/source/class/inspector/theme/Decoration.js
Expand Up @@ -10,21 +10,9 @@

qx.Theme.define("inspector.theme.Decoration",
{
extend : qx.theme.modern.Decoration,
extend : qx.theme.indigo.Decoration,

decorations :
{
"myToolbar" :
{
decorator: qx.ui.decoration.Uniform,

style :
{
width : 1,
color : "border-main",
backgroundImage : "decoration/toolbar/toolbar-gradient.png",
backgroundRepeat : "scale"
}
}
}
});
2 changes: 1 addition & 1 deletion component/inspector/source/class/inspector/theme/Font.js
Expand Up @@ -10,7 +10,7 @@

qx.Theme.define("inspector.theme.Font",
{
extend : qx.theme.modern.Font,
extend : qx.theme.indigo.Font,

fonts :
{
Expand Down
6 changes: 4 additions & 2 deletions component/inspector/source/class/inspector/view/ToolBar.js
Expand Up @@ -39,7 +39,6 @@ qx.Class.define("inspector.view.ToolBar",

this.__model.addListener("changeInspected", this.__changeInspected, this);

this.setDecorator("myToolbar");
this._getLayout().setAlignY("middle");

// create the headline label
Expand All @@ -55,6 +54,9 @@ qx.Class.define("inspector.view.ToolBar",

this.addSeparator();

this.__windowsPart = new qx.ui.toolbar.Part();
this.add(this.__windowsPart);

// Objects window
this.__createWindow("Objects", inspector.objects.Window, "_objectsButton");

Expand Down Expand Up @@ -165,7 +167,7 @@ qx.Class.define("inspector.view.ToolBar",
this.__state.add(win, name.toLowerCase());

var button = this[buttonRef] = new qx.ui.toolbar.CheckBox(name);
this.add(button);
this.__windowsPart.add(button);

button.addListener("changeValue", function(e) {
e.getData() ? win.open() : win.close();
Expand Down

0 comments on commit 9553b4c

Please sign in to comment.