small changes to UI

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@224 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Pavol Rusnak 2009-06-29 14:38:30 +00:00
parent 54e20edef2
commit ece4974a91
4 changed files with 151 additions and 160 deletions

View File

@ -1,5 +1,5 @@
body {
background-color: #E8E8E8;
background: #E8E8E8;
}
#svg_editor {
@ -31,22 +31,15 @@ body {
vertical-align: middle;
width: 640px;
height: 480px;
border-left: 1px solid #FFFFFF;
border-top: 1px solid #FFFFFF;
border-right: 1px solid #808080;
border-bottom: 1px solid #808080;
}
#svg_editor div#palette_holder {
border: 2px solid #808080;
border-top: none;
overflow-x: scroll;
overflow-y: hidden;
position: absolute;
left: 75px;
right: 2px;
bottom: 22px;
height: 31px;
border: 1px solid #808080;
border-top: none;
margin-top: 2px;
}
#svg_editor #fill_color, #svg_editor #stroke_color {
@ -72,12 +65,12 @@ body {
#svg_editor div#workarea {
position:absolute;
top: 70px;
left: 75px;
top: 40px;
left: 40px;
right: 2px;
bottom: 53px;
background-color: #E8E8E8;
border: 2px solid #808080;
bottom: 100px;
background-color: #A0A0A0;
border: 1px solid #808080;
overflow: auto;
}
@ -87,40 +80,30 @@ body {
float: left;
}
#svg_editor .tools_panel {
/* background: #E8E8E8;*/
/* border: 1px solid #808080;*/
}
#svg_editor #context_tools {
#svg_editor #tools_top {
position: absolute;
left: 19px;
left: 38px;
right: 2px;
top: 2px;
height: 68px;
height: 36px;
border-bottom: none;
}
#svg_editor #context_tools div {
#svg_editor #tools_top div {
float: left;
}
#svg_editor #tools_container {
#svg_editor #tools_left {
position: absolute;
left: 2px;
top: 70px;
bottom: 22px;
}
#svg_editor #tools {
border-right: none;
width: 70px;
text-align: center;
width: 36px;
top: 38px;
left: 2px;
}
/* TODO: fix this */
div.color_block {
display:inline-block;
display: inline-block;
}
#svg_editor #selected_panel {
@ -204,8 +187,6 @@ div.color_block {
position: absolute;
display: none;
background: #E8E8E8;
/* border: 1px solid #808080;
padding: 5px;*/
}
#svg_editor .tools_flyout {
@ -259,21 +240,29 @@ div.color_block {
background-color: #B0B0B0;
}
#svg_editor #footer {
#svg_editor #tools_bottom {
position: absolute;
left: 75px;
left: 40px;
right: 2px;
bottom: 2px;
height: 20px;
border-top: none;
height: 100px;
}
#svg_editor #footer_left {
#svg_editor #tools_bottom_1 {
width: 100px;
height: 100px;
float: left;
position: absolute;
top: -2px;
}
#svg_editor #footer_right {
float: right;
#svg_editor #tools_bottom_2 {
width: 250px;
height: 100px;
float: left;
}
#svg_editor #tools_bottom_3 {
}
#svg_editor #copyright {
text-align: right;
}

View File

@ -15,14 +15,11 @@
<div id="svg_editor">
<div id="workarea">
<style id="styleoverrides" type="text/css"></style>
<div id="svgcanvas">
<div id="svgcanvas"></div>
</div>
</div>
<div id="context_tools" class="tools_panel">
<div id="tools_top" class="tools_panel">
<!-- File-like buttons: New, Save -->
<div>
<img class="tool_button" id="tool_clear" src="images/clear.png" title="New Image [N]" alt="Clear" />
@ -131,14 +128,20 @@
</select>
<input id="text" class="text_tool" type="text" title="Change text contents" size="35"/>
</div>
</div>
</div> <!-- tools_top -->
<div id="palette_holder">
<div id="palette" title="Click to change fill color, shift-click to change stroke color"></div>
</div>
<div id="tools_left" class="tools_panel">
<img class="tool_button_current" id="tool_select" src="images/select.png" title="Select Tool [1]" alt="Select"/><br/>
<img class="tool_button" id="tool_path" src="images/path.png" title="Pencil Tool [2]" alt="Pencil"/><br/>
<img class="tool_button" id="tool_line" src="images/line.png" title="Line Tool [3]" alt="Line"/><br/>
<img class="tool_button" id="tools_rect_show" src="images/square.png" title="Square/Rect Tool [4/Shift+4]" alt="Square"/><br/>
<img class="tool_button" id="tools_ellipse_show" src="images/circle.png" title="Ellipse/Circle Tool [5/Shift+5]" alt="Circle"/><br/>
<img class="tool_button" id="tool_text" src="images/text.png" title="Text Tool [6]" alt="Text"/>
</div> <!-- tools_left -->
<div id="footer" class="tools_panel">
<div id="footer_left">
<div id="tools_bottom" class="tools_panel">
<div id="tools_bottom_1">
<select id="resolution">
<option selected="selected">640x480</option>
<option>800x600</option>
@ -147,23 +150,14 @@
<option>1600x1200</option>
</select>
</div>
<div id ="footer_right">SVG-edit v2.2-preAlpha @ <a href="http://svg-edit.googlecode.com/">http://svg-edit.googlecode.com/</a>
</div>
</div>
<div id="tools_container">
<div id="tools" class="tools_panel">
<img class="tool_button_current" id="tool_select" src="images/select.png" title="Select Tool [1]" alt="Select"/><br/>
<img class="tool_button" id="tool_path" src="images/path.png" title="Pencil Tool [2]" alt="Pencil"/><br/>
<img class="tool_button" id="tool_line" src="images/line.png" title="Line Tool [3]" alt="Line"/><br/>
<img class="tool_button" id="tools_rect_show" src="images/square.png" title="Square/Rect Tool [4/Shift+4]" alt="Square"/><br/>
<img class="tool_button" id="tools_ellipse_show" src="images/circle.png" title="Ellipse/Circle Tool [5/Shift+5]" alt="Circle"/><br/>
<img class="tool_button" id="tool_text" src="images/text.png" title="Text Tool [6]" alt="Text"/>
<hr/>
<div>opacity<br/>
<select id="group_opacity" title="Change group opacity">
<div id="tools_bottom_2">
<table>
<tr>
<td>fill:</td>
<td><div id="fill_color" class="color_block" title="Change fill color"></div></td>
<td>
<select id="fill_opacity" title="Change fill opacity">
<option selected="selected" value="1">100 %</option>
<option value="0.9">90 %</option>
<option value="0.8">80 %</option>
@ -174,14 +168,13 @@
<option value="0.3">30 %</option>
<option value="0.2">20 %</option>
<option value="0.1">10 %</option>
</select>
</div> <!-- opacity -->
<hr/>
<div>fill<br/>
<div id="fill_color" class="color_block" title="Change fill color"></div>
<select id="fill_opacity" title="Change fill opacity">
</select>
</td>
</tr><tr>
<td>stroke:</td>
<td><div id="stroke_color" class="color_block" title="Change stroke color"></div></td>
<td>
<select id="stroke_opacity" title="Change stroke opacity">
<option selected="selected" value="1">100 %</option>
<option value="0.9">90 %</option>
<option value="0.8">80 %</option>
@ -192,28 +185,31 @@
<option value="0.3">30 %</option>
<option value="0.2">20 %</option>
<option value="0.1">10 %</option>
</select>
</div> <!-- fill -->
<hr/>
<div>stroke<br/>
<div id="stroke_color" class="color_block" title="Change stroke color"></div><br/>
<select id="stroke_width" title="Change stroke width">
</select>
</td>
<td>
<select id="stroke_width" title="Change stroke width">
<option selected="selected" value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="5">5</option>
<option value="7">7</option>
</select>
<select id="stroke_style" title="Change stroke dash style">
</select>
</td>
<td>
<select id="stroke_style" title="Change stroke dash style">
<option selected="selected" value="none">---</option>
<option value="2,2">...</option>
<option value="5,5">- -</option>
<option value="5,2,2,2">- .</option>
<option value="5,2,2,2,2,2">- ..</option>
</select>
<select id="stroke_opacity" title="Change stroke opacity">
</td>
</tr><tr>
<td>group:</td>
<td></td>
<td>
<select id="group_opacity" title="Change group opacity">
<option selected="selected" value="1">100 %</option>
<option value="0.9">90 %</option>
<option value="0.8">80 %</option>
@ -224,23 +220,33 @@
<option value="0.3">30 %</option>
<option value="0.2">20 %</option>
<option value="0.1">10 %</option>
</select>
</div> <!-- stroke -->
</div> <!-- tools -->
<div id="color_picker"></div>
<div id="tools_rect" class="tools_flyout">
<div id="tool_square" class="tool_flyout_button" title="Square"></div>
<div id="tool_rect" class="tool_flyout_button" title="Rectangle"></div>
<div id="tool_fhrect" class="tool_flyout_button" title="Free-Hand Rectangle"></div>
</select>
</td>
</tr>
</table>
</div>
<div id="tools_ellipse" class="tools_flyout">
<div id="tool_circle" class="tool_flyout_button" title="Circle"></div>
<div id="tool_ellipse" class="tool_flyout_button" title="Ellipse"></div>
<div id="tool_fhellipse" class="tool_flyout_button" title="Free-Hand Ellipse"></div>
<div id="tools_bottom_3">
<div id="palette_holder"><div id="palette" title="Click to change fill color, shift-click to change stroke color"></div></div>
<div id="copyright">SVG-edit v2.2-preAlpha @ <a href="http://svg-edit.googlecode.com/">http://svg-edit.googlecode.com/</a></div>
</div>
</div>
<!-- hidden divs -->
<div id="color_picker"></div>
<div id="tools_rect" class="tools_flyout">
<div id="tool_square" class="tool_flyout_button" title="Square"></div>
<div id="tool_rect" class="tool_flyout_button" title="Rectangle"></div>
<div id="tool_fhrect" class="tool_flyout_button" title="Free-Hand Rectangle"></div>
</div>
<div id="tools_ellipse" class="tools_flyout">
<div id="tool_circle" class="tool_flyout_button" title="Circle"></div>
<div id="tool_ellipse" class="tool_flyout_button" title="Ellipse"></div>
<div id="tool_fhellipse" class="tool_flyout_button" title="Free-Hand Ellipse"></div>
</div>
</div> <!-- tools_container -->

View File

@ -166,9 +166,9 @@ function svg_edit_setup() {
$('#palette').append(str);
var pos = $('#tools_rect_show').position();
$('#tools_rect').css({'left': pos.left+2, 'top': pos.top+2});
$('#tools_rect').css({'left': pos.left+4, 'top': pos.top+40});
pos = $('#tools_ellipse_show').position();
$('#tools_ellipse').css({'left': pos.left+2, 'top': pos.top+2});
$('#tools_ellipse').css({'left': pos.left+4, 'top': pos.top+40});
$('#stroke_width').change(function(){
svgCanvas.setStrokeWidth(this.options[this.selectedIndex].value);
@ -541,10 +541,6 @@ function svg_edit_setup() {
$('#resolution').val(x+'x'+y);
$('#svgroot').css( { 'width': x, 'height': y } );
$('#svgcanvas').css( { 'width': x, 'height': y } );
$('div#palette_holder').css('width', x);
$('#context_tools').css('width', x + 65);
$('#tools').css('height', y + 24);
$('#footer').css('width', x + 65);
}
$('#resolution').change(function(){