[1.0] Ensuring you can see the animated window in Gray theme

  1. #1

    [1.0] Ensuring you can see the animated window in Gray theme

    I was originally going to post a question asking how to solve this and worked it out while typing the post, so thought I'd at least share it :)

    Basically in 1.0/ExtJS 3.3, the gray theme seems to be very light in some areas, including the window proxy (the thing that is shown when animating the close/hide of a window). In fact, I could not even see the window proxy in the gray theme at all and my monitor is pretty good!

    I had a look at the ExtJS CSS for the gray theme and indeed the proxy's background is almost white!

    Here's the original CSS:

    .x-window-proxy {
         background-color:#fcfcfc;
         border-color:#d0d0d0;
    }
    So changing it, e.g. to something like this, seemed to do the trick:

    .x-window-proxy {
         background-color:#ccc;
         border-color:#a0a0a0;
    }
    Here's a full example if it helps:

    <%@ Page Language="C#" AutoEventWireup="true" %>
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Showing window with animation</title>
        <style type="text/css">
            body { font:9pt/1.68 verdana, sans-serif; padding:1em; }
            p { padding-top:1em; }
            .x-window-proxy {
                 /* original rules for gray theme
                 background-color:#fcfcfc;
                 border-color:#d0d0d0;
                 */
                 background-color:#ccc;
                 border-color:#a0a0a0;
             }
         </style>
    </head>
    <body>
        <ext:ResourceManager ID="ResourceManager1" runat="server" DirectEventUrl="default.aspx" />
        <form id="form1" runat="server">
        <div>
            <ext:Button ID="WindowLauncher" Text="Launch Window" runat="server">
                <Listeners>
                    <Click Handler="#{Window}.show();" />
                </Listeners>
            </ext:Button>
     
            <ext:Window ID="Window" Title="Test" runat="server" AnimateTarget="WindowLauncher" Hidden="true">
                <Content>
                    <p>{Test}</p>
                </Content>
            </ext:Window>
     
            <p><button id="Test2">Launch second window with Ext JS</button></p>
     
            <script type="text/javascript">
                Ext.onReady(function () {
                    Ext.get("Test2").on('click', function (e, btn) {
                        new Ext.Window({ title: "Test", modal: false, html: "Test", width: 300, height: 100 }).show(btn);
                        e.preventDefault();
                    });
                });
            </script>
     
        </div>
        </form>
    </body>
    </html>
  2. #2
    Hi Anup,

    Thanks for sharing your example!
    Geoffrey McGill
    Founder

Similar Threads

  1. [CLOSED] Spinner Field in gray and default theme
    By softmachine2011 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jun 01, 2012, 4:09 PM
  2. Problem with the gray theme
    By plykkegaard in forum 2.x Help
    Replies: 0
    Last Post: Apr 26, 2012, 7:24 AM
  3. [CLOSED] [1.0] Gray Theme
    By ljankowski in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Aug 11, 2010, 2:21 PM
  4. [CLOSED] [1.0] Theme Gray is now different as of last SVN?
    By bsnezw in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Feb 02, 2010, 7:02 PM
  5. [CLOSED] Gray theme css referencing default folder
    By jchau in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Nov 05, 2008, 8:08 PM

Posting Permissions