Ui Customizer Plugin Mac

broken image


Style - the theme and font of the UI is set in the dashboard sidebar. You can select a default Light, Dark or Custom Theme. You cannot have different themes for each tab. You can also choose to use the basic Angular Material themes instead if you like, either just within any uitemplates or for the whole Dashboard. The official front-end framework for building experiences that fit seamlessly into Microsoft 365.

  1. Ui Customizer Plugin Mac Os
  2. Mac Ui Design Software
  3. Mac Ui Design
  4. Ui Customizer Plugin Mac

A UI Theme is customized by adding information to the UI Theme description file that overrides the base (Light or Darcula) UI Theme.

Color Highlighter Plugin adds additional color preview inside the editor.

Introduction to UI Theme Description File Syntax

The syntax of a Theme description file follows the JSON open-standard file format of key-value pairs. The minimum valid default file is the output of the DevKit Theme Wizard. Adding key-value pairs customizes a Theme.

UI Theme key-value pairs often use color as the value. Colors are defined by six-digit RGB or eight-digit RGBA hexadecimal notation.

UI Theme Reference Implementations

When learning new syntax, it is often useful to have some existing implementations for reference. For example, refer to the Theme description file for the IntelliJ IDEA High Contrast Theme. It may also help to review some of the UI Themes available at the JetBrains Plugins Repository.

Defining Named Colors

Colors can always be defined individually as six-digit RGB or eight-digit RGBA hexadecimal notation. However, Theme definitions often use the same color in multiple places. Maintaining a Theme is more manageable if Named Colors are globally defined in a colors {} block as part of the *.theme.json file. After that, the Named Color can be used instead of a hexadecimal description of the color. For example, defining the Named Color basicBackground and then using it to set the background color of panels. (Don't be concerned with the 'ui' syntax in the example below; it will be discussed in Custom UI Control Colors.)

{ 'name': 'theme_basics', 'dark': false, 'author': 'IntelliJ Platform SDK', 'editorScheme': '/Lightning.xml', 'colors': { 'basicBackground': '#E1E1E1' }, 'ui': { 'Panel.background': 'basicBackground' }}

Customizing Icons

UI themes can customize the color of default IntelliJ Platform UI icons or substitute custom icons for the default ones. Customization is done by adding an 'icons': {} section to the Theme description file.

Overriding the Global Color of Icons

Default global icon colors are customized by adding key-value pairs to a 'ColorPalette': {} section. The ColorPalette must be inserted in the icons section.

In the following example, the key- the default red color (#DB5860) used for Action icons in the Light Theme - is overridden to the value of a different color (#D61A26):

{ 'icons': { 'ColorPalette': { '#DB5860': '#D61A26' } }}

This color substitution is applied throughout the IDE UI.

Custom Icon Palette Colors

Icon Palettes are predefined UI Theme color keys that describe a single color in an Actions or Objects context.

Icon Colors in 'Actions' and 'Objects' Contexts

IntelliJ Platform has default icon colors defined for Actions and Objects contexts.

  • Actions are Theme keys for icons that appear in the context of toolbars, and represent actions such as Compile, Run, or Debug.

  • Objects are Theme keys for icons that appear in the contexts of lists and trees, and represent entities like files, symbols, or run and debug configurations.

The JetBrains Platform UI Guideline for Icons defines the default hexadecimal RGB values of colors for Actions and Objects keys. Note that this document refers to Objects keys as 'Noun icons.'

Customizing 'Actions' and 'Objects' Icon Colors

An icon Palette color is customized by adding an Actions or Objectskey and custom color value to the 'ColorPalette': {} section in a Theme description file. The list of available icon Actions and Objects keys are provided by the editor's completion popup:

For example, the following key-value pair changes the color for all blue-colored icons on toolbars to the color #5BC0DE:

{ 'icons': { 'ColorPalette': { 'Actions.Blue': '#5BC0DE' } }}

This more specific change to the Actions.Blue color overrides the default definition. In the narrower context of blue Actions icons, it will also supersede any global color overrides of the default blue icon color.

Custom Icons

The default IntelliJ Platform UI icons can be replaced by custom icons. The file format for icons is SVG. The JetBrains Platform UI Guideline for Icons has detailed specifications for icons.

An icon replacement is described within the icon {} section of a Theme description file. Note that icon replacement key-value pairs appear outside of the ColorPalette section.

For icon substitutions, the key is the path to the default icon image. This path is derived from the AllIcons.[Group].[IconName] path in icon section reported by the UI Inspector.

Customizer

For example, the Build (hammer) icon in the toolbar has the path Allcons.Actions.Compile as reported by the UI Inspector. Therefore the key for the Build icon is /actions/compile.svg. The value is the replacement icon's file name, located in the resources folder of the UI Theme plugin project:

{ 'icons': { '/actions/compile.svg': '/factory.svg' }}

The color of a replaced icon takes precedence over any ColorPalette overrides.

For generating the SVG icons suited for the IntelliJ-based IDEs, you may also use the third-party web tool – IntelliJ Icon Generator.

Customizing UI Controls

UI Themes can change the appearance of more general controls in the IntelliJ Platform UI. Examples of these controls are labels, buttons, checkboxes, trees, lists, and menus.

See also Platform theme colors — UI components in IntelliJ Platform UI Guidelines.

Custom UI Control Colors

A UI control's custom color is specified by adding a key-value pair to the 'ui': {} section of a Theme description file.

A UI control key has the compound format element.property, where:

  • element is the type (label, checkbox, etc.) of the UI control.

  • property is how the color is applied. Examples include foreground, background, and errorForeground.

Note that some UI control keys have more than two parts, for example, Popup.Advertiser.foreground or ScrollBar.Mac.Transparent.thumbColor. The full key must be used to customize that specific button control. However, for other purposes, the first section can be considered the element, and the last section considered the property.

Methods for finding UI control keys are in the Finding Attribute Keys for UI Controls section.

Customizing All UI Control Colors with the Same Property

All UI Controls with the same property portion of their key can be set to the same color. This customization is done using the wildcard '*': {} section in the Theme description file. A key-value pair is inserted in this section, but only the property portion of the key is specified. The value is the custom color.

The following example would change the default background color to #AED7E3 for all UI controls:

Note that the wildcard '*': {} section must be within the 'ui': {} section.

Customizing the Color of Specific UI Control Types

The color of a specific UI control type is changed by adding a key-value pair to the 'ui': {} section of a Theme description file. The key is the full element.property format, and the value is the custom color.

The following example sets the background color for all labels to the color #F6E9C9

{ 'ui': { '*': { 'background': '#AED7E3' }, 'Label.background': '#F6E9C9' }}

The Label.background entry supersedes, in the narrower context of label backgrounds, any default color, and any wildcard color assigned to backgrounds.

Customizing the Color of UI Tabs

UI Tab colors are changed by key-value pairs in a Theme description file.

There are two implementations of tabs in the IntelliJ Platform:

  • Editor Tabs, which represent open files in the Editor window, and in Tool Window bars.

  • Tabbed Panes, which are used for the Run/Debug Configurations dialog.

The control keys for UI Tabs were expanded from release 2019.1 to 2019.2 of the IntelliJ Platform. The 2019.1 release control keys are compatible with release 2019.2 and later versions of the IntelliJ Platform.

Release 2019.1 ElementRelease 2019.2 ElementDescription of Release 2019.2 Element
N/ADefaultTabsApplied to all tabs except TabbedPane, unless overridden by a more specific Tab control element.
EditorTabsEditorTabsApplied only to Editor tabs. Overrides any DefaultTab settings. 192 has many more property settings than 191.
ToolWindow.HeaderTabToolWindow.HeaderTabApplied only to Tool Window tabs. Overrides any DefaultTab settings. 192 has many more property settings than 191.
DebuggerTabsDefaultTabsDefaultTab settings are used instead of DebuggerTabs, except for key DebuggerTabs.underlineHeight.
TabbedPaneTabbedPaneApplied only to Tabbed Panes.
Plugins.TabTabbedPaneUse TabbedPane instead.
SearchEverywhere.TabSearchEverywhere.TabNo change.

Methods for identifying UI control keys are in the Finding Attribute Keys for UI Controls section. Reduce picture size mac.

For example, here is an excerpt from the IntelliJ Platform High Contrast Theme: Note that a Theme file can mix versions of property identifiers:

  • The first three property entries are recognized by release 2019.1 and ignored by subsequent releases because they are defined by new property identifiers.

  • The underlineColorproperty is recognized by release 2019.1 and subsequent releases.

  • The underlineHeightproperty was introduced in release 2019.2, and is ignored by previous releases.

  • The underlinedTabBackgroundproperty was introduced in release 2019.2, replaces the 2019.1 selectedBackground, and is ignored by previous releases.

  • The inactiveColoredFileBackgroundproperty was introduced in release 2019.2, replaces the 2019.1 inactiveMaskColor, and is ignored by previous releases.

{ 'ui': { 'EditorTabs': { 'selectedForeground': '#FFFFFF', 'selectedBackground': '#0e5d73', 'inactiveMaskColor': '#000000FF', 'underlineColor': '#1AEBFF', 'underlineHeight': 4, 'underlinedTabBackground': '#000000', 'inactiveColoredFileBackground': '#00000000' } }}

Customizing the Borders of UI Controls

The color and geometry of borders used in UI controls can be customized by key-value pairs in a Theme description file. The format of keys for borders is element.property, where:

  • element is the type of UI control containing a border, such as a window or a popup menu.

  • property is the desired border appearance, for example:
    • border is the border width (in pixels) specified as a top, left, bottom, and right widths. Border color is also (optionally) specified as hexadecimal RGB, e.g. 'E6E6E6' with no '#' character.

    • borderInsets is the inset distance (in pixels) from the edge of the element to the border. It is specified as top, left, bottom, and right insets.

Methods for identifying UI control keys are in the Finding Attribute Keys for UI Controls section.

Customizing the Border Appearance of Specific UI Controls

Adding a key-value pair to the 'ui': {} section of a Theme description file customizes the appearance of borders for specific UI control types.

Ui Customizer Plugin Mac Os

The following example sets a new border width and color for all windows:

In this example, the customized border supersedes the default definition and any global color override.

Finding Attribute Keys for UI Controls

There are hundreds of UI control element.property keys defined in the IntelliJ Platform UI. Some keys and strategies for applying them can be gleaned from the UI Theme reference implementations. For a general search, here some suggested methods for locating UI control keys.

Finding a UI Control Key Using Code Completion in the Editor

The preferred method of finding UI control keys is to use the Code Completion feature in the editor. Note that some keys presented by the code completion feature may be deprecated. New entries in the 'ui': {} section will invoke the code completion popup, as shown below:

Beginning with version 2019.2 of the IntelliJ Platform, the editor has added features for Code Completion and Quick Documentation to show the release in which a UI control key began to be supported. It appears as the Since attribute in editor popups. In the Quick Documentation popup, the format is e.g., Since: 2019.2. The Code Completion popup is similar, but the format is e.g., [Since 2019.2].

Finding a UI Control Key Using Laf Defaults UI

Using the Laf Defaults inspector, enter the element portion of the key. The Laf Defaults inspector will prompt with a list of UI Control keys and their default color.

Last modified: 23 February 2021

Qt Designer's plugin-based architecture allows user-defined and third party custom widgets to be edited just like you do with standard Qt widgets. All of the custom widget's features are made available to Qt Designer, including widget properties, signals, and slots. Since Qt Designer uses real widgets during the form design process, custom widgets will appear the same as they do when previewed.

The QtDesigner module provides you with the ability to create custom widgets in Qt Designer.

Getting Started

To integrate a custom widget with Qt Designer, you require a suitable description for the widget and an appropriate .pro file.

Providing an Interface Description

To inform Qt Designer about the type of widget you want to provide, create a subclass of QDesignerCustomWidgetInterface that describes the various properties your widget exposes. Most of these are supplied by functions that are pure virtual in the base class, because only the author of the plugin can provide this information.

FunctionDescription of the return value
name()The name of the class that provides the widget.
group()The group in Qt Designer's widget box that the widget belongs to.
toolTip()A short description to help users identify the widget in Qt Designer.
whatsThis()A longer description of the widget for users of Qt Designer.
includeFile()The header file that must be included in applications that use this widget. This information is stored in UI files and will be used by uic to create a suitable #includes statement in the code it generates for the form containing the custom widget.
icon()An icon that can be used to represent the widget in Qt Designer's widget box.
isContainer()True if the widget will be used to hold child widgets; false otherwise.
createWidget()A QWidget pointer to an instance of the custom widget, constructed with the parent supplied.

Note: createWidget() is a factory function responsible for creating the widget only. The custom widget's properties will not be available until load() returns.

domXml()A description of the widget's properties, such as its object name, size hint, and other standard QWidget properties.
codeTemplate()This function is reserved for future use by Qt Designer.

Two other virtual functions can also be reimplemented:

initialize()Sets up extensions and other features for custom widgets. Custom container extensions (see QDesignerContainerExtension) and task menu extensions (see QDesignerTaskMenuExtension) should be set up in this function.
isInitialized()Returns true if the widget has been initialized; returns false otherwise. Reimplementations usually check whether the initialize() function has been called and return the result of this test.

Notes on the domXml() Function

The domXml() function returns a UI file snippet that is used by Qt Designer's widget factory to create a custom widget and its applicable properties.

Since Qt 4.4, Qt Designer's widget box allows for a complete UI file to describe one custom widget. The UI file can be loaded using the tag. Specifying the tag allows for adding the element that contains additional information for custom widgets. The tag is sufficient if no additional information is required

If the custom widget does not provide a reasonable size hint, it is necessary to specify a default geometry in the string returned by the domXml() function in your subclass. For example, the AnalogClockPlugin provided by the Custom Widget Plugin example, defines a default widgetgeometry in the following way:

An additional feature of the domXml() function is that, if it returns an empty string, the widget will not be installed in Qt Designer's widget box. However, it can still be used by other widgets in the form. This feature is used to hide widgets that should not be explicitly created by the user, but are required by other widgets.

A complete custom widget specification looks like:

Using external hard drive for mac. Attributes of the tag:

AttributePresenceValuesComment
languageoptional'c++', 'jambi'This attribute specifies the language the custom widget is intended for. It is mainly there to prevent C++-plugins from appearing in Qt Jambi.
displaynameoptionalClass nameThe value of the attribute appears in the Widget box and can be used to strip away namespaces.

The tag tells Qt Designer and uic which method should be used to add pages to a container widget. This applies to container widgets that require calling a particular method to add a child rather than adding the child by passing the parent. In particular, this is relevant for containers that are not a a subclass of the containers provided in Qt Designer, but are based on the notion of Current Page. In addition, you need to provide a container extension for them.

The element can contain a list of property meta information.

The tag may be used to specify a tool tip to be shown in Property Editor when hovering over the property. The property name is given in the attribute name and the element text is the tooltip. This functionality was added in Qt 5.6.

For properties of type string, the tag can be used. This tag has the following attributes:

AttributePresenceValuesComment
namerequiredName of the property
typerequiredSee below tableThe value of the attribute determines how the property editor will handle them.
notroptional'true', 'false'If the attribute is 'true', the value is not meant to be translated.

Values of the type attribute of the string property:

ValueType
'richtext'Rich text.
'multiline'Multi-line plain text.
'singleline'Single-line plain text.
'stylesheet'A CSS-style sheet.
'objectname'An object name (restricted set of valid characters).
'url'URL, file name.

Mac Ui Design Software

Plugin Requirements

In order for plugins to work correctly on all platforms, you need to ensure that they export the symbols needed by Qt Designer.

First of all, the plugin class must be exported in order for the plugin to be loaded by Qt Designer. Use the Q_PLUGIN_METADATA() macro to do this. Also, the QDESIGNER_WIDGET_EXPORT macro must be used to define each custom widget class within a plugin, that Qt Designer will instantiate.

Creating Well Behaved Widgets

Some custom widgets have special user interface features that may make them behave differently to many of the standard widgets found in Qt Designer. Specifically, if a custom widget grabs the keyboard as a result of a call to QWidget::grabKeyboard(), the operation of Qt Designer will be affected.

To give custom widgets special behavior in Qt Designer, provide an implementation of the initialize() function to configure the widget construction process for Qt Designer specific behavior. This function will be called for the first time before any calls to createWidget() and could perhaps set an internal flag that can be tested later when Qt Designer calls the plugin's createWidget() function.

Building and Installing the Plugin

A Simple Plugin

The Custom Widget Plugin Example demonstrates a simple Qt Designer plugin.

The .pro file for a plugin must specify the headers and sources for both the custom widget and the plugin interface. Typically, this file only has to specify that the plugin's project is to be built as a library, but with specific plugin support for Qt Designer. This is done with the following declarations:

The QT variable contains the keyword uiplugin. It indicates that the plugin uses the abstract interfaces QDesignerCustomWidgetInterface and QDesignerCustomWidgetCollectionInterface only and has no linkage to the Qt Designer libraries. When accessing other interfaces of Qt Designer that have linkage, designer should be used instead; this ensures that the plugin dynamically links to the Qt Designer libraries and has a run-time dependency on them.

If plugins are built in a mode that is incompatible with Qt Designer, they will not be loaded and installed. For more information about plugins, see the Plugins HOWTO document.

It is also necessary to ensure that the plugin is installed together with other Qt Designer widget plugins:

The $[QT_INSTALL_PLUGINS] variable is a placeholder to the location of the installed Qt plugins. You can configure Qt Designer to look for plugins in other locations by setting the QT_PLUGIN_PATH environment variable before running the application.

Note: Qt Designer will look for a designer subdirectory in each path supplied.

See QCoreApplication::libraryPaths() for more information about customizing paths for libraries and plugins with Qt applications.

Splitting up the Plugin

In a real world scenario, you do not want to have dependencies of the application making use of the custom widgets to the Qt Designer headers and libraries as introduced by the simple approach explained above.

The following sections describe how to resolve this.

Linking the Widget into the Application

The source and header file of the custom widget can be shared between the application and Qt Designer by creating a .pri file for inclusion:

This file would then be included by the .pro file of the plugin and the application:

Sharing the Widget Using a Library

Another approach is to put the widget into a library that is linked to the Qt Designer plugin as well as to the application. It is recommended to use static libraries to avoid problems locating the library at run-time.

Mac Ui Design

For shared libraries, see Creating Shared Libraries.

Using the Plugin with QUiLoader

The preferred way of adding custom widgets to QUiLoader is to subclass it reimplementing QUiLoader::createWidget().

Ui Customizer Plugin Mac

However, it is also possible to use Qt Designer custom widget plugins (see QUiLoader::pluginPaths() and related functions). To avoid having to deploy the Qt Designer libraries onto the target device, those plugins should have no linkage to the Qt Designer libraries (QT = uiplugin, see Creating Custom Widgets for Qt Designer#BuildingandInstallingthePlugin).

Related Examples

For more information on using custom widgets in Qt Designer, refer to the Custom Widget Plugin and World Time Clock Plugin examples for more information about using custom widgets in Qt Designer. Also, you can use the QDesignerCustomWidgetCollectionInterface class to combine several custom widgets into a single library.

© 2021 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.





broken image