From 7ea6f6d28edabb0eb07a383dbbf6d3ac72ee347a Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Mon, 25 Jul 2022 20:00:32 +1000 Subject: [PATCH] Fix BackgroundColour documentation. Update changelog. Move contributors into website. Create changelog link. --- .all-contributorsrc | 2 - CHANGELOG.md | 34 +--- CONTRIBUTORS.md | 48 +---- README.md | 173 +----------------- v2/pkg/options/options.go | 24 ++- website/docs/guides/dynamic-assets.mdx | 2 +- website/docs/reference/options.mdx | 6 +- .../current/guides/dynamic-assets.mdx | 2 +- website/src/pages/changelog.md | 8 + .../guides/dynamic-assets.mdx | 2 +- .../reference/options.mdx | 6 +- .../guides/dynamic-assets.mdx | 2 +- .../reference/options.mdx | 6 +- 13 files changed, 48 insertions(+), 267 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index e83ceee5c..399aba2d3 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -1,7 +1,5 @@ { "files": [ - "README.md", - "README.zh-Hans.md", "website/src/pages/credits.mdx" ], "imageSize": 75, diff --git a/CHANGELOG.md b/CHANGELOG.md index e74282965..688d6a20f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,34 +1,2 @@ -2019-07-20 **v0.17.6-pre** -* Significant refactor of runtime -* Removed wailsbridge file - now a unified approach taken -* Fixed React on Windows - Thanks [Florian Didran](https://github.com/fdidron)! - -2019-06-18 **v0.16.0** -* React template FTW! - Thanks [admin_3.exe](https://github.com/bh90210)! -* Updated contributors -* Arch Linux detection without lsb-release -* Removed deprecated methods for dealing with JS/CSS in the backend - -2019-05-29 **v0.14.11-pre** -* Windows fix for spinner - -2019-05-29 **v0.14.10-pre** -* Windows fix for Vuetify - -2019-05-29 **v0.14.9-pre** -* Vuetify project template πŸŽ‰ - -2019-05-29 **v0.14.8-pre** -* Updated Ubuntu npm install command - -2019-05-22 **v0.14.7-pre** -* New projects are built automatically when initialised -* Go 1.12 is now a minimum requirement - -2019-05-21 **v0.14.6-pre** -* Hotfix for module dependency issue - -2019-05-20 **v0.14.5-pre** -* Added developer tooling - New Template Generator -* Documentation fixes - Thanks [admin_3.exe](https://github.com/bh90210)! +The current changelog may be found at: https://wails.io/changelog/ \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 72d6bd9d9..a7b5a60ab 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1,48 +1,2 @@ -# Contributors -Wails is what it is because of the time and effort given by these great people. A huge thank you to each and every one! - - * [Dustin Krysak](https://wiki.ubuntu.com/bashfulrobot) - * [Qais Patankar](https://github.com/qaisjp) - * [Anthony Lee](https://github.com/alee792) - * [Adrian Lanzafame](https://github.com/lanzafame) - * [Mattn](https://github.com/mattn) - * [0xflotus](https://github.com/0xflotus) - * [Michael D Henderson](https://github.com/mdhender) - * [fred2104](https://github.com/fishfishfish2104) - * [intelwalk](https://github.com/intelwalk) - * [Mark Stenglein](https://github.com/ocelotsloth) - * [admin_3.exe](https://github.com/bh90210) - * [iceleo-com](https://github.com/iceleo-com) - * [fallendusk](https://github.com/fallendusk) - * [Nikolai Zimmermann](https://github.com/Chronophylos) - * [Toyam Cox](https://github.com/Vaelatern) - * [Robin Eklind](https://github.com/mewmew) - * [Kris Raney](https://github.com/kraney) - * [Jack Mordaunt](https://github.com/JackMordaunt) - * [Michael Hipp](https://github.com/MichaelHipp) - * [Travis McLane](https://github.com/tmclane) - * [Reuben Thomas-Davis](https://github.com/Rested) - * [Jarek](https://github.com/Jarek-SRT) - * [Konez2k](https://github.com/konez2k) - * [msms](https://github.com/sayuthisobri) - * [dedo1911](https://github.com/dedo1911) - * [Florian Didron](https://github.com/fdidron) - * [Christopher Murphy](https://github.com/Splode) - * [ZΓ‘mbΓ³, Levente](https://github.com/Lyimmi) - * [artem](https://github.com/Unix4ever) -* [Tim Kipp](https://github.com/timkippdev) -* [Dmitry Gomzyakov](https://github.com/kyoto44) -* [Arthur Wiebe](https://github.com/artooro) -* [IlgΔ±t YΔ±ldΔ±rΔ±m](https://github.com/ilgityildirim) -* [Altynbek](https://github.com/gelleson) -* [Kyle](https://github.com/kmuchmore) -* [Balakrishna Prasad Ganne](https://github.com/aayush420) -* [Charaf Rezrazi](https://github.com/Rezrazi) -* [misitebao](https://github.com/misitebao) -* [Elie Grenon](https://github.com/DrunkenPoney) -* [SophieAu](https://github.com/SophieAu) -* [Alexander Matviychuk](https://github.com/alexmat) -* [RH12503](https://github.com/RH12503) -* [hi019](https://github.com/hi019) -* [Igor Minen](https://github.com/Igogrek) +The latest contributors list may be found at: https://wails.io/credits#contributors \ No newline at end of file diff --git a/README.md b/README.md index 54d60a338..55761ecab 100644 --- a/README.md +++ b/README.md @@ -242,177 +242,8 @@ The installation instructions are on the [official website](https://wails.io/doc ## Contributors - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Lea Anthony

πŸ’» πŸ€” 🎨 πŸ–‹ πŸ’‘ πŸ§‘β€πŸ« πŸ“† πŸ”§ πŸ› πŸ“ 🚧 πŸ“¦ πŸ‘€ πŸ’¬ πŸ”¬ ⚠️ βœ… πŸ“’ πŸ‘€ πŸ“–

stffabi

πŸ’» πŸ€” 🎨 πŸ› 🚧 πŸ“¦ πŸ‘€ πŸ’¬ πŸ”¬ πŸ‘€ πŸ“– ⚠️

Travis McLane

πŸ’» πŸ”¬ πŸ“¦ πŸ€” πŸ› πŸ‘€ ⚠️ πŸ’¬ πŸ“–

Misite Bao

πŸ“– 🌍 πŸ”¬ 🚧

Byron Chris

πŸ’» πŸ”¬ 🚧 πŸ› πŸ‘€ ⚠️ πŸ’¬ πŸ€” 🎨 πŸ“¦ πŸš‡

konez2k

πŸ’» πŸ“¦ πŸ€”

Dario Emerson

πŸ’» πŸ› πŸ€” ⚠️

Ian M. Jones

πŸ’» πŸ› πŸ€” ⚠️ πŸ‘€ πŸ“¦

marktohark

πŸ’»

Ryan H

πŸ’»

Cody Bentley

πŸ’» πŸ“¦ πŸ€” πŸ’΅

Florent

πŸ’» πŸ›

Alexander Hudek

πŸ’» πŸ’΅

Tim Kipp

πŸ’»

Altynbek Kaliakbarov

πŸ’»

Nikolai Zimmermann

πŸ’»

k-muchmore

πŸ’»

Snider

πŸ’» πŸ€” πŸ“– πŸ’΅

Albert Sun

πŸ’» ⚠️

Ariel

πŸ’» πŸ›

IlgΔ±t YΔ±ldΔ±rΔ±m

πŸ’» πŸ› πŸ’΅

Toyam Cox

πŸ’» πŸ“¦ πŸ›

hi019

πŸ’» πŸ›

Arthur Wiebe

πŸ’» πŸ›

Balakrishna Prasad Ganne

πŸ’»

BillBuilt

πŸ’» πŸ“¦ πŸ€” πŸ’¬ πŸ’΅

Eng Zer Jun

🚧 πŸ’»

LGiki

πŸ“–

Lontten

πŸ“–

Lukas Crepaz

πŸ’» πŸ›

Marcus Crane

πŸ› πŸ“– πŸ’΅

Qais Patankar

πŸ“–

Wakeful-Cloud

πŸ’» πŸ›

ZΓ‘mbΓ³, Levente

πŸ’» πŸ“¦ πŸ› ⚠️

Ironpark

πŸ’» πŸ€”

mondy

πŸ’» πŸ“–

Benjamin Ryan

πŸ›

fallendusk

πŸ“¦ πŸ’»

Mat Ryer

πŸ’» πŸ€” πŸ›

Abtin

πŸ’» πŸ›

Adrian Lanzafame

πŸ“¦ πŸ’»

Aleksey Polyakov

πŸ› πŸ’»

Alexander Matviychuk

πŸ’» πŸ“¦

AlienRecall

πŸ’» πŸ“¦

Aman

πŸ“–

Amaury Tobias Quiroz

πŸ’» πŸ›

Andreas Wenk

πŸ“–

Antonio Stanković

πŸ’» πŸ“¦

Arpit Jain

πŸ“–

Austin Schey

πŸ’» πŸ›

Benjamin Thomas

πŸ’» πŸ“¦ πŸ€”

Bertram Truong

πŸ’» πŸ›

Blake Bourque

πŸ“–

Denis

πŸ“–

diogox

πŸ’» πŸ“¦

Dmitry Gomzyakov

πŸ’» πŸ“¦

Edward Browncross

πŸ’»

Elie Grenon

πŸ’»

Florian Didron

πŸ’» πŸ› πŸ€” ⚠️ πŸ‘€ πŸ“¦

GargantuaX

πŸ“– πŸ’΅

Igor Minin

πŸ’» πŸ›

Jae-Sung Lee

πŸ’» πŸ€”

Jarek

πŸ’» πŸ“¦

Junker

πŸ“–

Kris Raney

πŸ’» πŸ›

Luken

πŸ“–

Mark Stenglein

πŸ’» πŸ›

buddyabaddon

πŸ’»

MikeSchaap

πŸ’» πŸ›

NYSSEN MichaΓ«l

πŸ’» πŸ›

Nan0

πŸ’» πŸ€” ⚠️ πŸ‘€

oskar

πŸ“–

Pierre Joye

πŸ’» πŸ› πŸ€” ⚠️

Reuben Thomas-Davis

πŸ’» πŸ›

Robin

πŸ’» πŸ›

Sebastian Bauer

πŸ’» πŸ€” ⚠️ πŸ‘€ πŸ’¬

Sidharth Rathi

πŸ“– πŸ›

Sithembiso Khumalo

πŸ’» πŸ›

Soheib El-Harrache

πŸ’» πŸ› πŸ’΅

Sophie Au

πŸ’» πŸ›

Stefanos Papadakis

πŸ’» πŸ›

Steve Chung

πŸ’» πŸ›

Timm Ortloff

πŸ“–

Tom

πŸ’»

Valentin TrinquΓ©

πŸ’» πŸ›

mattn

πŸ’» πŸ›

bearsh

πŸ’» πŸ€” πŸ“–

chenxiao

πŸ’» πŸ€” πŸ“–

fengweiqiang

πŸ’» πŸ“¦

flin7

πŸ“–

fred21O4

πŸ“–

gardc

πŸ“– βœ…

rayshoo

πŸ“–

Ishiyama Yuzuki

πŸ’» πŸ›

δ½°ι˜…

πŸ’»

εˆ€εˆ€

πŸ“– πŸ›

归位

πŸ’» πŸ›

skamensky

πŸ’» πŸ€” πŸ“–

dependabot[bot]

πŸ’» 🚧

Damian Sieradzki

πŸ’΅

John Dorman

πŸ’΅

Ian Sinnott

πŸ’΅

Arden Shackelford

πŸ’΅

Bironou

πŸ’΅

CharlieGo_

πŸ’΅

overnet

πŸ’΅

jugglingjsons

πŸ’΅

Selvin Ortiz

πŸ’΅

ZanderCodes

πŸ’΅

Michael Voronov

πŸ’΅

letheanVPN

πŸ’΅

Tai Groot

πŸ’΅

easy-web-it

πŸ’΅

Michael Olson

πŸ’΅

EdenNetwork Italia

πŸ’΅

ondoki

πŸ’΅

QuEST Rail LLC

πŸ’΅

GilgameΕ‘

πŸ’΅

Bernt-Johan Bergshaven

πŸ’΅

Liam Bigelow

πŸ’΅

Nick Arellano

πŸ’΅

Frank Chiarulli Jr.

πŸ’΅

Tyler

πŸ’΅

Trea Hauet

πŸ’΅

Kent 'picat' Gruber

πŸ’΅

tc-hib

πŸ’΅

Antonio

πŸ“–

MyNameIsAres

πŸ“–
- - - - - - +The contributors list is getting too big for the readme! All the amazing people who have contributed to this +project have their own page [here](https://wails.io/credits#contributors). diff --git a/v2/pkg/options/options.go b/v2/pkg/options/options.go index 05bfe7d7c..4c67fb732 100644 --- a/v2/pkg/options/options.go +++ b/v2/pkg/options/options.go @@ -41,7 +41,9 @@ type App struct { StartHidden bool HideWindowOnClose bool AlwaysOnTop bool - BackgroundColour *RGBA + // BackgroundColour is the background colour of the window + // You can use the options.NewRGB and options.NewRGBA functions to create a new colour + BackgroundColour *RGBA // RGBA is deprecated. Please use BackgroundColour RGBA *RGBA Assets fs.FS @@ -71,6 +73,26 @@ type RGBA struct { A uint8 `json:"a"` } +// NewRGBA creates a new RGBA struct with the given values +func NewRGBA(r, g, b, a uint8) *RGBA { + return &RGBA{ + R: r, + G: g, + B: b, + A: a, + } +} + +// NewRGB creates a new RGBA struct with the given values and Alpha set to 255 +func NewRGB(r, g, b uint8) *RGBA { + return &RGBA{ + R: r, + G: g, + B: b, + A: 255, + } +} + // MergeDefaults will set the minimum default values for an application func MergeDefaults(appoptions *App) { err := mergo.Merge(appoptions, Default) diff --git a/website/docs/guides/dynamic-assets.mdx b/website/docs/guides/dynamic-assets.mdx index 8b07e823b..fd6b91798 100644 --- a/website/docs/guides/dynamic-assets.mdx +++ b/website/docs/guides/dynamic-assets.mdx @@ -58,7 +58,7 @@ func main() { Width: 1024, Height: 768, Assets: assets, - BackgroundColour: &options.RGBA{R: 27, G: 38, B: 54, A: 1}, + BackgroundColour: &options.RGBA{R: 27, G: 38, B: 54, A: 255}, OnStartup: app.startup, AssetsHandler: NewFileLoader(), Bind: []interface{}{ diff --git a/website/docs/reference/options.mdx b/website/docs/reference/options.mdx index 3029d77d9..7b81e5ca0 100644 --- a/website/docs/reference/options.mdx +++ b/website/docs/reference/options.mdx @@ -202,11 +202,11 @@ hide the window instead. Name: BackgroundColour -Type: int (0xRRGGBBAA) -Example: 0xFF000088 - Red at 50% transparency +Type: *options.RGBA +Example: options.NewRGBA(255,0,0,128) - Red at 50% transparency This value is the default background colour of the window. -Default: 0xFFFFFFFF. +Default: white ### AlwaysOnTop diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/dynamic-assets.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/dynamic-assets.mdx index fbb7bf4ed..198050841 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/dynamic-assets.mdx +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/dynamic-assets.mdx @@ -58,7 +58,7 @@ func main() { Width: 1024, Height: 768, Assets: assets, - BackgroundColour: &options.RGBA{R: 27, G: 38, B: 54, A: 1}, + BackgroundColour: &options.RGBA{R: 27, G: 38, B: 54, A: 255}, OnStartup: app.startup, AssetsHandler: NewFileLoader(), Bind: []interface{}{ diff --git a/website/src/pages/changelog.md b/website/src/pages/changelog.md index ac969a431..00664cb0a 100644 --- a/website/src/pages/changelog.md +++ b/website/src/pages/changelog.md @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## Added + +* Added `options.NewRGBA` and `options.NewRGB` functions to create `*options.RGBA` by @leaanthony + +## Fixed + +* BackgroundColour documentation fix + ## [v2.0.0-beta.40] - 2022-07-24 ## Added diff --git a/website/versioned_docs/version-v2.0.0-beta.39/guides/dynamic-assets.mdx b/website/versioned_docs/version-v2.0.0-beta.39/guides/dynamic-assets.mdx index 8b07e823b..fd6b91798 100644 --- a/website/versioned_docs/version-v2.0.0-beta.39/guides/dynamic-assets.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.39/guides/dynamic-assets.mdx @@ -58,7 +58,7 @@ func main() { Width: 1024, Height: 768, Assets: assets, - BackgroundColour: &options.RGBA{R: 27, G: 38, B: 54, A: 1}, + BackgroundColour: &options.RGBA{R: 27, G: 38, B: 54, A: 255}, OnStartup: app.startup, AssetsHandler: NewFileLoader(), Bind: []interface{}{ diff --git a/website/versioned_docs/version-v2.0.0-beta.39/reference/options.mdx b/website/versioned_docs/version-v2.0.0-beta.39/reference/options.mdx index 4acccf724..0c0393e10 100644 --- a/website/versioned_docs/version-v2.0.0-beta.39/reference/options.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.39/reference/options.mdx @@ -204,11 +204,11 @@ hide the window instead. Name: BackgroundColour -Type: int (0xRRGGBBAA) -Example: 0xFF000088 - Red at 50% transparency +Type: *options.RGBA +Example: options.NewRGBA(255,0,0,128) - Red at 50% transparency This value is the default background colour of the window. -Default: 0xFFFFFFFF. +Default: white ### AlwaysOnTop diff --git a/website/versioned_docs/version-v2.0.0-beta.40/guides/dynamic-assets.mdx b/website/versioned_docs/version-v2.0.0-beta.40/guides/dynamic-assets.mdx index 8b07e823b..fd6b91798 100644 --- a/website/versioned_docs/version-v2.0.0-beta.40/guides/dynamic-assets.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.40/guides/dynamic-assets.mdx @@ -58,7 +58,7 @@ func main() { Width: 1024, Height: 768, Assets: assets, - BackgroundColour: &options.RGBA{R: 27, G: 38, B: 54, A: 1}, + BackgroundColour: &options.RGBA{R: 27, G: 38, B: 54, A: 255}, OnStartup: app.startup, AssetsHandler: NewFileLoader(), Bind: []interface{}{ diff --git a/website/versioned_docs/version-v2.0.0-beta.40/reference/options.mdx b/website/versioned_docs/version-v2.0.0-beta.40/reference/options.mdx index 3029d77d9..7b81e5ca0 100644 --- a/website/versioned_docs/version-v2.0.0-beta.40/reference/options.mdx +++ b/website/versioned_docs/version-v2.0.0-beta.40/reference/options.mdx @@ -202,11 +202,11 @@ hide the window instead. Name: BackgroundColour -Type: int (0xRRGGBBAA) -Example: 0xFF000088 - Red at 50% transparency +Type: *options.RGBA +Example: options.NewRGBA(255,0,0,128) - Red at 50% transparency This value is the default background colour of the window. -Default: 0xFFFFFFFF. +Default: white ### AlwaysOnTop