From 38e1fcd631f80d645f38a8ee2a6700dca0c0b2e6 Mon Sep 17 00:00:00 2001 From: Kazik Pogoda Date: Tue, 20 Aug 2024 20:31:35 +0200 Subject: [PATCH] more badges in README.md --- README.md | 46 ++++++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 87bd5de..e37a62c 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,29 @@ # xemantic-kotlin-swing-dsl -![main](https://github.com/xemantic/xemantic-kotlin-swing-dsl/actions/workflows/build-main.yml/badge.svg) -[![](https://dcbadge.limes.pink/api/server/https://discord.gg/vQktqqN2Vn?style=flat)](https://discord.gg/vQktqqN2Vn) - _Express your Swing code easily in Kotlin_ +[Maven Central Version +](https://central.sonatype.com/namespace/com.xemantic.kotlin) +![GitHub Release Date](https://img.shields.io/github/release-date/xemantic/xemantic-kotlin-swing-dsl?style=for-the-badge) +[license]() + +![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/xemantic/xemantic-kotlin-swing-dsl/build-main.yml?style=for-the-badge) +![GitHub branch check runs](https://img.shields.io/github/check-runs/xemantic/xemantic-kotlin-swing-dsl/main?style=for-the-badge) +![GitHub commits since latest release](https://img.shields.io/github/commits-since/xemantic/xemantic-kotlin-swing-dsl/latest?style=for-the-badge) +![GitHub last commit](https://img.shields.io/github/last-commit/xemantic/xemantic-kotlin-swing-dsl?style=for-the-badge) + +![GitHub contributors](https://img.shields.io/github/contributors/xemantic/xemantic-kotlin-swing-dsl?style=for-the-badge) +![GitHub commit activity](https://img.shields.io/github/commit-activity/t/xemantic/xemantic-kotlin-swing-dsl?style=for-the-badge) +![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/xemantic/xemantic-kotlin-swing-dsl?style=for-the-badge) +![GitHub Created At](https://img.shields.io/github/created-at/xemantic/xemantic-kotlin-swing-dsl?style=for-the-badge) +![kotlin version](https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2Fxemantic%2Fxemantic-kotlin-swing-dsl%2Fmain%2Fgradle%2Flibs.versions.toml&query=versions.kotlin&style=for-the-badge&label=kotlin) +![kotlinx-coroutines version](https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2Fxemantic%2Fxemantic-kotlin-swing-dsl%2Fmain%2Fgradle%2Flibs.versions.toml&query=versions.kotlinxCoroutines&style=for-the-badge&label=kotlinx-coroutines) + +[![](https://dcbadge.limes.pink/api/server/https://discord.gg/vQktqqN2Vn)](https://discord.gg/vQktqqN2Vn) +![Discord](https://img.shields.io/discord/811561179280965673?style=for-the-badge&link=https%3A%2F%2Fdiscord.gg%2FvQktqqN2Vn) +[X (formerly Twitter) Follow +](https://x.com/KazikPogoda) + ## Why? Kotlin provides incredible language sugar over pure Java. Using Kotlin @@ -42,12 +61,10 @@ import kotlinx.coroutines.flow.* import java.awt.Dimension import java.net.URI -fun main() = MainWindow("My Browser") { +fun main() = MainWindow("My Browser") { window -> val urlBox = TextField() val goButton = Button("Go!") { isEnabled = false } - val contentBox = TextArea { - preferredSize = Dimension(300, 300) - } + val contentBox = TextArea() urlBox.textChanges.listen { url -> goButton.isEnabled = url.isNotBlank() @@ -74,13 +91,11 @@ fun main() = MainWindow("My Browser") { goButton.isEnabled = true } - Border.empty(4) { - BorderPanel { - layout { - hgap = 4 - vgap = 4 - } - north { + window.preferredSize = Dimension(300, 300) + + BorderPanel { + north { + Border.empty(4) { BorderPanel { layout { hgap = 4 @@ -91,10 +106,9 @@ fun main() = MainWindow("My Browser") { east { goButton } } } - center { ScrollPane { contentBox } } } + center { ScrollPane { contentBox } } } - } ```