From 154df242938d180b680be57ee89fbb70cbffe005 Mon Sep 17 00:00:00 2001 From: Artur Morozov Date: Mon, 4 Mar 2019 15:42:06 +0300 Subject: [PATCH] api: update SkinCheckbox --- api/ui-widgets.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/api/ui-widgets.lua b/api/ui-widgets.lua index b2a3d9bb..750e372c 100644 --- a/api/ui-widgets.lua +++ b/api/ui-widgets.lua @@ -408,15 +408,16 @@ function pfUI.api.SetAllPointsOffset(frame, parent, offset) frame:SetPoint("BOTTOMRIGHT", parent, "BOTTOMRIGHT", -offset, offset) end -function pfUI.api.SkinCheckbox(frame) +function pfUI.api.SkinCheckbox(frame, size) frame:SetNormalTexture("") frame:SetPushedTexture("") frame:SetHighlightTexture("") - frame:SetWidth(18) - frame:SetHeight(18) + if size then + frame:SetWidth(size) + frame:SetHeight(size) + end CreateBackdrop(frame) - frame.backdrop:SetPoint("TOPLEFT", frame, "TOPLEFT", 4, -4) - frame.backdrop:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -4, 4) + SetAllPointsOffset(frame.backdrop, frame, 4) end function pfUI.api.SkinDropDown(frame, cr, cg, cb)