@@ -33,7 +33,6 @@ local DEFAULTS = {
3333 progressColor = " white" , -- "white", "gold", "green", "kind" (same colour as the icon) or "progress" (red to green)
3434 progressFormat = " slash" , -- "slash" 8/12, "spaced" 8 / 12, "both" 8/12 (67%), "percent" 67%, "left" 4 left
3535 progressShadow = false , -- drop shadow behind the text
36- progressBadge = true , -- the text sits in a badge (dark pill, gold border) -- experiment
3736 progressX = 36 , -- its X
3837 progressY = 0 , -- its Y
3938 bounce = true , -- floating up/down animation
@@ -108,9 +107,6 @@ local KIND_TINT = { daily = { 0.55, 0.8, 1 }, group = { 1, 0.5, 0.45 } }
108107local TEXT_FONTS = { friz = " Fonts\\ FRIZQT__.TTF" , arial = " Fonts\\ ARIALN.TTF" , skurri = " Fonts\\ skurri.ttf" , morpheus = " Fonts\\ MORPHEUS.TTF" }
109108local TEXT_FONT_ORDER = { " friz" , " arial" , " skurri" , " morpheus" }
110109local PROGRESS_FORMATS = { " slash" , " spaced" , " both" , " percent" , " left" }
111- local BADGE_BACKDROP = { bgFile = " Interface\\ ChatFrame\\ ChatFrameBackground" , edgeFile = " Interface\\ Tooltips\\ UI-Tooltip-Border" ,
112- tile = true , tileSize = 16 , edgeSize = 10 , insets = { left = 2 , right = 2 , top = 2 , bottom = 2 } }
113- local BADGE_PAD_X , BADGE_PAD_Y = 8 , 5
114110
115111local TEXT_OUTLINES = { none = " " , thin = " OUTLINE" , thick = " THICKOUTLINE" }
116112local TEXT_COLORS = { white = { 1 , 1 , 1 }, gold = { 1 , 0.82 , 0 }, green = { 0.3 , 1 , 0.3 } }
@@ -362,8 +358,7 @@ local function PlaceText(f, wave)
362358 text :ClearAllPoints ()
363359 label :ClearAllPoints ()
364360 if db .progressAttach then
365- -- In a badge the text is centred in the pill; plain, it starts right at the icon.
366- label :SetPoint (db .progressBadge and " CENTER" or " LEFT" )
361+ label :SetPoint (" LEFT" )
367362 text :SetPoint (" LEFT" , f , " RIGHT" , ATTACH_GAP , lift )
368363 else
369364 label :SetPoint (" CENTER" )
@@ -417,16 +412,6 @@ local function StyleIcon(f)
417412 color = color or TEXT_COLORS .white
418413 label :SetTextColor (color [1 ], color [2 ], color [3 ])
419414 label :SetText (shown )
420- -- Badge: a dark pill sized to the text, with a gold border.
421- if db .progressBadge and text .SetBackdrop then
422- text :SetBackdrop (BADGE_BACKDROP )
423- text :SetBackdropColor (0.05 , 0.04 , 0.02 , 0.85 )
424- text :SetBackdropBorderColor (1 , 0.82 , 0 , 0.9 )
425- text :SetSize ((label :GetStringWidth () or 30 ) + BADGE_PAD_X * 2 , (label :GetStringHeight () or 12 ) + BADGE_PAD_Y * 2 )
426- else
427- if text .SetBackdrop then text :SetBackdrop (nil ) end
428- text :SetSize (60 , 20 )
429- end
430415 text :SetScale (1 / scale )
431416 PlaceText (f , 0 )
432417 end
@@ -492,8 +477,7 @@ local function CreateIcon()
492477 icon :SetAllPoints ()
493478 f .icon = icon
494479
495- -- Backdrop template so the progress text can sit in a badge (dark pill, gold border).
496- local text = CreateFrame (" Frame" , nil , f , BackdropTemplateMixin and " BackdropTemplate" or nil )
480+ local text = CreateFrame (" Frame" , nil , f )
497481 text :SetSize (60 , 20 )
498482 text .label = text :CreateFontString (nil , " OVERLAY" )
499483 text .label :SetPoint (" CENTER" )
@@ -1560,7 +1544,7 @@ local DISPLAY_KEYS = { "active", "enabled", "objects", "anchor", "scale", "offse
15601544 " objectAnchor" , " objectScale" , " objectOffsetX" , " objectOffset" }
15611545local ICON_KEYS = { " style" , " bounce" , " bounceHeight" , " bounceSpeed" , " glow" , " glowAlpha" }
15621546local PROGRESS_KEYS = { " progress" , " progressAttach" , " progressFloat" , " progressSize" , " progressFont" ,
1563- " progressOutline" , " progressColor" , " progressFormat" , " progressShadow" , " progressBadge " , " progressX" , " progressY" }
1547+ " progressOutline" , " progressColor" , " progressFormat" , " progressShadow" , " progressX" , " progressY" }
15641548local BEHAVIOR_KEYS = { " colorByType" , " combat" , " minimap" , " minimapAngle" , " sound" , " soundChoice" }
15651549
15661550local function ResetKeys (keys )
@@ -1662,13 +1646,12 @@ local function BuildProgressTab(tab)
16621646 Gate (ProgressOn , AddDropdown (tab , " TEXT_COLOR" , { " white" , " gold" , " green" , " kind" , " progress" },
16631647 function (value ) return L [" COLOR_" .. value ] end , Choice (" progressColor" ), SetChoice (" progressColor" ),
16641648 COL2 + 4 , TOP - 162 , COLUMN_DROPDOWN ))
1665- GateCheck (ProgressOn , AddCheck (tab , " TEXT_SHADOW" , " TEXT_SHADOW_TIP" , " progressShadow" , COL1 , TOP - 214 ))
1666- GateCheck (ProgressOn , AddCheck (tab , " PROGRESS_BADGE" , " PROGRESS_BADGE_TIP" , " progressBadge" , COL2 , TOP - 214 ))
1649+ GateCheck (ProgressOn , AddCheck (tab , " TEXT_SHADOW" , " TEXT_SHADOW_TIP" , " progressShadow" , COL1 , TOP - 196 ))
16671650
16681651 -- Attached, the text is glued to the icon: X/Y only apply when it stands on its own.
16691652 local function FreeTextOn () return ProgressOn () and not db .progressAttach end
1670- Gate (FreeTextOn , AddSlider (tab , " POS_X" , " progressX" , - POSITION_RANGE , POSITION_RANGE , 1 , COL1 + 4 , TOP - 270 , " %d" ))
1671- Gate (FreeTextOn , AddSlider (tab , " POS_Y" , " progressY" , - POSITION_RANGE , POSITION_RANGE , 1 , COL2 + 4 , TOP - 270 , " %d" ))
1653+ Gate (FreeTextOn , AddSlider (tab , " POS_X" , " progressX" , - POSITION_RANGE , POSITION_RANGE , 1 , COL1 + 4 , TOP - 252 , " %d" ))
1654+ Gate (FreeTextOn , AddSlider (tab , " POS_Y" , " progressY" , - POSITION_RANGE , POSITION_RANGE , 1 , COL2 + 4 , TOP - 252 , " %d" ))
16721655end
16731656
16741657local function BuildIconTab (tab )
@@ -1830,7 +1813,7 @@ end
18301813local SETTINGS_SECTIONS = {
18311814 { key = " TAB_DISPLAY" , build = BuildDisplayTab , height = 258 },
18321815 { key = " TAB_ICON" , build = BuildIconTab , height = 184 },
1833- { key = " TAB_PROGRESS" , build = BuildProgressTab , height = 310 },
1816+ { key = " TAB_PROGRESS" , build = BuildProgressTab , height = 292 },
18341817 { key = " TAB_BEHAVIOR" , build = BuildBehaviorTab , height = 152 },
18351818}
18361819local SECTION_GAP = 18
0 commit comments