Forcing Sketchup to use IE8 and other Web Dialog problems
-
@aerilius said:
In WebDialogs, I set the background color manually because not all browsers/OSs do it right:
dlg.execute_script('document.getElementsByTagName("body")[0].style.background="'+dlg.get_default_dialog_color+'"')
I usually do it on the Ruby-side, before I call
show()
, ie:dlg.set_background_color( dlg.get_default_dialog_color )
-
@Anton: Users will hate your right-justified switches.
In a left-to-right language, the checkboxes are on the left, and each label is left-justified.
Try this to make it look more like a dialog:
<form> <fieldset hidefocus="true" tabIndex="-1"> <legend>Chain Multiple Commands</legend> <label name="L1" id="L1" class="label_cbox"> <input type="checkbox" name="CB1" id="CB1" class="form_cbox" checked="false"/> SU Full Screen</label> <!-- ... etc. ... --> </fieldset> </form>
-
@dan rathbun said:
I usually do it on the Ruby-side, before I call show(), ie:
When I saw that method in the docs, I liked it also more until I found that it didn't work on Windows 7 (returned white).
Interestingly, on Windows 7, the CSS color "%(#000080)[window]
" is also white, but SketchUp'sdlg.get_default_dialog_color
works. I think driven reported similar problems with OS X (we then used a hard-coded gray for the OS X dialog).I wished this all was less complicated.
-
Well.. it returns white on Win7 because that IS the system dialog background color "out of the box".
(One reason I hate Windows 6+ is they try to make dialogs look like webpages!)Anyway.. a user can set their own theme, or download a premade theme from the Web, in which the dialog background may not be white at all.
The other day, on XP, as a test I changed my system dialog color to Purple, just to test that method, and it worked, it returned the purple color that I had set. And SketchUp also used that color for background of it's dialogs and toolbars, etc.
Advertisement