Skip to content

Commit

Permalink
-fixed StdUi:Radio border highlight color changing
Browse files Browse the repository at this point in the history
-added border highlight to StdUi:ColorInput making it consistant with StdUi:Checkbox highlighting
  • Loading branch information
dotrich committed Dec 8, 2019
1 parent d8a8818 commit e8856f6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions widgets/Button.lua
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ end
function StdUi:Button(parent, width, height, text, inherit)
local button = self:HighlightButton(parent, width, height, text, inherit)
button.stdUi = self;

button:SetHighlightTexture(nil);

self:ApplyBackdrop(button);
Expand Down
2 changes: 2 additions & 0 deletions widgets/Checkbox.lua
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,13 @@ local CheckboxEvents = {
function StdUi:Checkbox(parent, text, width, height)
local checkbox = CreateFrame('Button', nil, parent);
checkbox.stdUi = self;

checkbox:EnableMouse(true);
self:SetObjSize(checkbox, width, height or 20);
self:InitWidget(checkbox);

checkbox.target = self:Panel(checkbox, 16, 16);
checkbox.target.stdUi = self;
checkbox.target:SetPoint('LEFT', 0, 0);

checkbox.value = true;
Expand Down
4 changes: 4 additions & 0 deletions widgets/ColorPicker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ function StdUi:ColorInput(parent, label, width, height, color)
self:InitWidget(button);

button.target = self:Panel(button, 16, 16);
button.target.stdUi = self;
button.target:SetPoint('LEFT', 0, 0);

button.text = self:Label(button, label);
Expand All @@ -298,6 +299,9 @@ function StdUi:ColorInput(parent, label, width, height, color)

button.color = {r = 1, g = 1, b = 1, a = 1};

self:HookDisabledBackdrop(button); --ColorInput has no visual difference when disabled unlike Checkbox
self:HookHoverBorder(button);

for k, v in pairs(ColorInputMethods) do
button[k] = v;
end
Expand Down

0 comments on commit e8856f6

Please sign in to comment.