sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Forcing Sketchup to use IE8 and other Web Dialog problems

    Scheduled Pinned Locked Moved Developers' Forum
    24 Posts 5 Posters 1.1k Views 5 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • thomthomT Offline
      thomthom
      last edited by

      Right - I'm not sure what triggers that. Markup or the host application.

      On a sidenote, maybe I suggest some comments on your dialog. Tone down the contract 255,0,0 red on completely black 0,0,0 background is very hard on the eyes. If you pick a slightly more subtle tone so the contrast ratio is less I'll be softer on your eye.

      It's also best to stick with one font - and I recommend a sans-serif font (which is the de-facto standard in all applications). Script and fantasy styled fonts are not very legible.

      Thomas Thomassen β€” SketchUp Monkey & Coding addict
      List of my plugins and link to the CookieWare fund

      1 Reply Last reply Reply Quote 0
      • Dan RathbunD Offline
        Dan Rathbun
        last edited by

        @anton_s said:

        Same here, I also want to use latest Internet Explorer style; Buttons to be highlighted and rounded at corners like in IE8, checkboxes to be similiar to IE8, and everything else.

        USE THIS META TAG:

        <!DOCTYPE html>
        <html>
          <head>
             <meta http-equiv="MSThemeCompatible" content="Yes">
          <!-- Some code -->
          </head>
          <body>
            <!-- Some code -->
          </body>
        </html>
        
        

        I'm not here much anymore.

        1 Reply Last reply Reply Quote 0
        • A Offline
          Anton_S
          last edited by

          @dan rathbun said:

          <meta http-equiv="MSThemeCompatible" content="Yes">

          Yup, that works!
          Thanks πŸ˜„

          1 Reply Last reply Reply Quote 0
          • A Offline
            Anton_S
            last edited by

            @thomthom said:

            Right - I'm not sure what triggers that. Markup or the host application.

            On a sidenote, maybe I suggest some comments on your dialog. Tone down the contract 255,0,0 red on completely black 0,0,0 background is very hard on the eyes. If you pick a slightly more subtle tone so the contrast ratio is less I'll be softer on your eye.

            It's also best to stick with one font - and I recommend a sans-serif font (which is the de-facto standard in all applications). Script and fantasy styled fonts are not very legible.

            Thanks, helpful sidenote πŸ˜‰

            1 Reply Last reply Reply Quote 0
            • A Offline
              Aerilius
              last edited by

              @dan rathbun said:

              <meta http-equiv="MSThemeCompatible" content="Yes">

              I especially like this, it makes the dialog look less like a webpage and more like an application dialog.
              The operating system's default fonts and colors can be achieved with CSS2.1 system styles (is supposed to be enhanced/replaced by CSS3 appearance, but only Firefox implements that properly). 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+'"')

              1 Reply Last reply Reply Quote 0
              • Dan RathbunD Offline
                Dan Rathbun
                last edited by

                CSS3 Appearance has been cancelled in the latest revision. (And have not gone back to the 2.x docs, and removed those dire warnings.)

                I'm not here much anymore.

                1 Reply Last reply Reply Quote 0
                • Dan RathbunD Offline
                  Dan Rathbun
                  last edited by

                  @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 )

                  I'm not here much anymore.

                  1 Reply Last reply Reply Quote 0
                  • Dan RathbunD Offline
                    Dan Rathbun
                    last edited by

                    @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>
                    
                    

                    I'm not here much anymore.

                    1 Reply Last reply Reply Quote 0
                    • A Offline
                      Aerilius
                      last edited by

                      @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's dlg.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.

                      1 Reply Last reply Reply Quote 0
                      • Dan RathbunD Offline
                        Dan Rathbun
                        last edited by

                        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.

                        I'm not here much anymore.

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 2 / 2
                        • First post
                          Last post
                        Buy SketchPlus
                        Buy SUbD
                        Buy WrapR
                        Buy eBook
                        Buy Modelur
                        Buy Vertex Tools
                        Buy SketchCuisine
                        Buy FormFonts

                        Advertisement