Skip to content

Releases: nperovic/ColorButton.ahk

v1.3.1

08 Jun 10:54
ab86ab5
Compare
Choose a tag to compare

image

New Feature

  • The border width of the button is now customisable with ShowBorder parameter or ShowBorder property.

ShowBorder

/**
 * @prop {Integer} ShowBorder
 * Border preference. (To set the border preference, you must have used `SetColor()`, `SetBackColor()`, or `BackColor` to set the background colour at least once beforehand.)
 * - `n` : The higher the value, the thicker the button's border when focused.
 * - `1` : Highlight when focused.
 * - `0` : No border displayed.
 * - `-1`: Border always visible.
 * - `-n`: The lower the value, the thicker the button's border when always visible.
 */

Full Changelog: v1.3.0...v1.3.1

v1.3.0

06 Jun 14:55
7461656
Compare
Choose a tag to compare

20240606-1422-06 7135167

New Features:

  • Customise the button text colour.
  • Customise the button border colour.
  • Customise the button border display timing (always show, show on focus, never show).
  • Once the button background colour is set, you can use properties to alter various settings.

Added Properties

TextColor

Set/ Get the Button Text Color (RGB). (To set the text colour, you must have used SetColor(), SetBackColor(), or BackColor to set the background colour at least once beforehand.)

BackColor

Set/Get the Button Background Color (RGB).
(To set the background color, you must have used SetColor(), SetBackColor(), or BackColor at least once beforehand.)

BorderColor

Button Border Color (RGB).
(To set the border color, you must have used SetColor(), SetBackColor(), or BackColor to set the background color at least once beforehand.)

RoundedCorner

Rounded Corner Preference for the Button.
(To set the rounded corner preference, you must have used SetColor(), SetBackColor(), or BackColor to set the background color at least once beforehand.)

ShowBorder

Border Preference.

  • 1: Highlight when focused.
  • 0: No border displayed.
  • -1: Border always visible.
    (To set the border preference, you must have used SetColor(), SetBackColor(), or BackColor to set the background color at least once beforehand.)

新功能:

  • 自訂按鈕文字顏色
  • 自訂按鈕邊框顏色
  • 自訂按鈕邊框顯示時機(總是顯示、聚焦時顯示、從不顯示)。
  • 一旦設定了按鈕背景顏色,您就可以使用屬性來變更各種設定。

新增屬性

TextColor

設定/獲取按鈕文字顏色(RGB)。(要設定文字顏色,您必須至少先前使用過 SetColor()SetBackColor()BackColor 設定過背景顏色。)

BackColor

設定/獲取按鈕背景顏色(RGB)。
(要設定背景顏色,您必須至少先前使用過 SetColor()SetBackColor()BackColor 設定過背景顏色。)

BorderColor

按鈕邊框顏色(RGB)。
(要設定邊框顏色,您必須至少先前使用過 SetColor()SetBackColor()BackColor 設定過背景顏色。)

RoundedCorner

按鈕圓角偏好設定。
(要設定圓角偏好,您必須至少先前使用過 SetColor()SetBackColor()BackColor 設定過背景顏色。)

ShowBorder

邊框偏好設定。

  • 1:聚焦時突顯。
  • 0:不顯示邊框。
  • -1:總是顯示邊框。
    (要設定邊框偏好,您必須至少先前使用過 SetColor()SetBackColor()BackColor 設定過背景顏色。)

Nove funkcije:

  • Prilagodite boju teksta dugmeta.
  • Prilagodite boju ivice dugmeta.
  • Prilagodite vreme prikaza ivice dugmeta (uvek prikazano, prikazuje se kada je fokusirano, nikada se ne prikazuje).
  • Kada postavite boju pozadine dugmeta, možete koristiti svojstva da promenite različita podešavanja.

Dodata svojstva

TextColor

Postavite/ Dobijte Boju Teksta Dugmeta (RGB). (Da biste postavili boju teksta, morali ste bar jednom prethodno koristiti SetColor(), SetBackColor(), ili BackColor da postavite boju pozadine.)

BackColor

Postavite/ Dobijte Boju Pozadine Dugmeta (RGB).
(Da biste postavili boju pozadine, morali ste bar jednom prethodno koristiti SetColor(), SetBackColor(), ili BackColor.)

BorderColor

Boja Ivice Dugmeta (RGB).
(Da biste postavili boju ivice, morali ste bar jednom prethodno koristiti SetColor(), SetBackColor(), ili BackColor da postavite boju pozadine.)

RoundedCorner

Preferencija Zaobljenog Ugla za Dugme.
(Da biste postavili preferenciju zaobljenog ugla, morali ste bar jednom prethodno koristiti SetColor(), SetBackColor(), ili BackColor da postavite boju pozadine.)

ShowBorder

Preferencija Ivice.

  • 1: Istaknuto kada je fokusirano.
  • 0: Ivice se ne prikazuju.
  • -1: Ivice su uvek vidljive.
    (Da biste postavili preferenciju ivice, morali ste bar jednom prethodno koristiti SetColor(), SetBackColor(), ili BackColor da postavite boju pozadine.)

Full Changelog: v1.2.2...v1.3.0

v1.2.2

30 May 19:07
Compare
Choose a tag to compare

20240530-1813-59 6227078

  1. Fixed an issue where the button appeared smaller than the default button, despite having the same size values.
  2. Added property Width and Height to RECT.
  3. Added a new parameter. Users can now choose whether to display the outline when a button is focused. See example here.
  4. The logic for extending the built-in Gui methods has been changed to better integrate versions v2.1-alpha and v2.0.

Full Changelog: v1.2.1...v1.2.2

v1.2.1

14 May 14:32
b69a5e3
Compare
Choose a tag to compare

Full Changelog: v1.2.0...v1.2.1

v1.2.0

01 May 14:18
e941552
Compare
Choose a tag to compare
  • AHK v2.0 is now supported.
  • A border frame has been added to highlight the button when focused.
  • Added an effect when the button is pressed.

colorButton_win11_demo_new

Full Changelog: v1.1.0...v1.2.0

v1.1.0

29 Apr 06:46
26ca136
Compare
Choose a tag to compare

Update ColorButton.ahk

image

New Features:

  • You can now customize the background color around buttons to give rounded buttons a smoother appearance.
  • Windows 10 users can also enable rounded buttons now.

Changes:

  • Our previous approach of using RoundRect to create rounded corners has been replaced with CreateRoundRectRgn + SetWindowRgn + FillRect for a higher-quality.

新增:

  • 現在可以設定按鈕周圍的背景顏色,使圓角按鈕的外觀更圓潤。
  • 現在 Windows 10 使用者也可以啟用圓角按鈕了。

變更

  • 原本使用 RoundRect 繪製圓角,但由於品質不佳,現已改用 CreateRoundRectRgn + SetWindowRgn + FillRect 來繪製圓角。

Full Changelog: v1.0.0...v1.1.0

v1.0.0

28 Apr 03:36
0374343
Compare
Choose a tag to compare