No description
  • C++ 56.3%
  • QML 40.4%
  • CMake 2%
  • GLSL 1.3%
Find a file
hypengw 21efe0c0d9
Some checks failed
/ build (push) Has been cancelled
/ deploy (push) Has been cancelled
add implicitBackgroundSize to iconButton
2025-12-27 14:15:29 +00:00
.github workflow: use doxygen from github release 2025-04-08 00:01:14 +00:00
assets GL_OES_standard_derivatives and timer to themeSize 2025-05-31 13:22:29 +00:00
cmake install cmake config 2025-04-19 15:44:24 +00:00
doc doc: use readme as main page 2025-04-07 23:51:33 +00:00
example impl checkbox 2025-06-21 13:40:48 +00:00
include/qml_material actiontoolbar expose alignment and delegate 2025-12-20 13:37:25 +00:00
qml add implicitBackgroundSize to iconButton 2025-12-27 14:15:29 +00:00
src actiontoolbar expose alignment and delegate 2025-12-20 13:37:25 +00:00
third_party remove absl header 2025-07-01 23:08:42 +08:00
.gitattributes more doc and add workflow 2025-04-07 13:42:07 +00:00
.gitignore Ignore CMakeLists.txt.user files 2025-05-09 20:52:42 +02:00
CMakeLists.txt cmake cache QML_MATERIAL_BUILD_TYPE 2025-12-14 09:16:58 +00:00
LICENSE move to mit 2025-03-11 08:37:24 +00:00
README.md add quickshell to ackn 2025-06-15 04:09:57 +00:00
update_icon_code.sh update icon code 2025-03-31 11:39:17 +00:00

Material Design 3 for Qml

This is a library of Qml implementing Google's Material Design.

🌐 Live Demo

Dependencies

  • Qt 6.8+

Doc

Work in progress

Installation

  • Git LFS is required to clone fonts.
FetchContent_Declare(
  qml_material
  GIT_REPOSITORY https://github.com/hypengw/QmlMaterial.git
  GIT_TAG main
  # GIT_TAG <commit>
  EXCLUDE_FROM_ALL)
FetchContent_MakeAvailable(qml_material)

Usage

import Qcm.Material as MD

MD.Text {
  text: 'hello world'
}

Note

Never import Qcm.Material without as, unless you know what you are doing.

No QtQuick.Controls

This library only use QtQuick.Templates.
No needs to import QtQuick.Controls, unless you need control from Quick Control Style.

Some type annotations:

  • not accept Action, use MD.Action instead
  • not accept Attached Properties/Signals form QtQuick.Controls, use QtQuick.Templates as T
      import QtQuick.Templates as T
    
      T.Overlay.modal: ...
      T.ScrollBar.vertical: ...
      ...
    

Variation Icon

CMake option: QM_ICON_FONT_URL
The default is embedded static round icon with wght=400 opsz=24 GRAD=0 FILL=0/1.
There is also an embedded partial variation one: qrc:/Qcm/Material/assets/MaterialSymbolsRounded.wght_400.opsz_24.woff2.
Set the option to it if you need animation when switching FILL.

Note

The full variation font will cause huge memory usage. It's better to make partial with a font tool.

Acknowledgements