Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Buttons in Window header with Shiva skin

    Hello, I've just noticed that a Button added in Window.headerControls, like this:

    Code:
    isc.DynamicForm.create({
        ID: "systemSelector",
        width:75, numCols:1,
        layoutAlign:"center",
        fields: [
            {name: "selectFont", type: "select", width:150, showTitle: false,
             valueMap: ["Development", "Staging", "Production"],
             defaultValue:"Development",
             change : "statusReport.setNewStatus(value)"
            }
        ]
    });
    
    isc.Window.create({
        width: 400, height: 200,
        title: "Status",
        canDragReposition: true, canDragResize: true,
        headerControls : ["closeButton", "minimizeButton", "headerLabel",
                          isc.IButton.create({title:"foo", layoutAlign:"center"})],
    
        items: [
            isc.HTMLFlow.create({
                ID:"statusReport",
                padding:5,
                width: "100%",
                height: "100%",
                setNewStatus : function (system) {
                    this.setContents(system +
                        ": <span style='color:green;font-weight:bold'>Normal</span><br>");
                }
            })
        ]
    });
    
    statusReport.setNewStatus("Development");
    is not very noticeable:

    Click image for larger version

Name:	2024-06-04 11.32.12.jpg
Views:	64
Size:	5.5 KB
ID:	272492

    #2
    I also noticed that when using a form as in the windowHeaderControls sample, but with the formItem title shown, its color doesn't match that of the header title :

    Click image for larger version

Name:	2024-06-04 15.09.01.jpg
Views:	54
Size:	6.5 KB
ID:	272497

    Comment


      #3
      Right now, we don't have a built-in system for auto-styling controls based on context. But you could, for example, add a CSS selector that uses the fact that "windowHeader" (or a similar style) is applied to an ancestor to cause form titles or button titles to shift color when used in the context of a window header.

      Comment

      Working...
      X