@@ -246,6 +246,45 @@ local function HeirloomsJournalLayoutCurrentPage()
246
246
end
247
247
end
248
248
249
+ local function SetsFrame_ScrollBoxUpdate (button )
250
+ for _ , child in next , { button .ScrollTarget :GetChildren () } do
251
+ if not child .IsSkinned then
252
+ child .Background :Hide ()
253
+ child .HighlightTexture :SetTexture (E .ClearTexture )
254
+ child .Icon :SetSize (42 , 42 )
255
+ S :HandleIcon (child .Icon )
256
+ child .IconCover :SetOutside (child .Icon )
257
+
258
+ child .SelectedTexture :SetDrawLayer (' BACKGROUND' )
259
+ child .SelectedTexture :SetColorTexture (1 , 1 , 1 , .25 )
260
+ child .SelectedTexture :ClearAllPoints ()
261
+ child .SelectedTexture :Point (' TOPLEFT' , 4 , - 2 )
262
+ child .SelectedTexture :Point (' BOTTOMRIGHT' , - 1 , 2 )
263
+ child .SelectedTexture :CreateBackdrop (' Transparent' )
264
+
265
+ child .IsSkinned = true
266
+ end
267
+ end
268
+ end
269
+
270
+ local function SetsFrame_SetItemFrameQuality (_ , itemFrame )
271
+ local icon = itemFrame .Icon
272
+ if not icon .backdrop then
273
+ icon :CreateBackdrop ()
274
+ icon :SetTexCoord (unpack (E .TexCoords ))
275
+ itemFrame .IconBorder :Hide ()
276
+ end
277
+
278
+ if itemFrame .collected then
279
+ local quality = C_TransmogCollection_GetSourceInfo (itemFrame .sourceID ).quality
280
+ local color = BAG_ITEM_QUALITY_COLORS [quality or 1 ]
281
+ icon .backdrop :SetBackdropBorderColor (color .r , color .g , color .b )
282
+ else
283
+ local r , g , b = unpack (E .media .bordercolor )
284
+ icon .backdrop :SetBackdropBorderColor (r , g , b )
285
+ end
286
+ end
287
+
249
288
local function SkinMountFrame ()
250
289
S :HandleItemButton (_G .MountJournalSummonRandomFavoriteButton )
251
290
S :HandleButton (_G .MountJournalFilterButton )
@@ -567,26 +606,7 @@ local function SkinTransmogFrames()
567
606
SetsCollectionFrame .LeftInset :StripTextures ()
568
607
S :HandleTrimScrollBar (SetsCollectionFrame .ListContainer .ScrollBar )
569
608
570
- hooksecurefunc (SetsCollectionFrame .ListContainer .ScrollBox , ' Update' , function (button )
571
- for _ , child in next , { button .ScrollTarget :GetChildren () } do
572
- if not child .IsSkinned then
573
- child .Background :Hide ()
574
- child .HighlightTexture :SetTexture (E .ClearTexture )
575
- child .Icon :SetSize (42 , 42 )
576
- S :HandleIcon (child .Icon )
577
- child .IconCover :SetOutside (child .Icon )
578
-
579
- child .SelectedTexture :SetDrawLayer (' BACKGROUND' )
580
- child .SelectedTexture :SetColorTexture (1 , 1 , 1 , .25 )
581
- child .SelectedTexture :ClearAllPoints ()
582
- child .SelectedTexture :Point (' TOPLEFT' , 4 , - 2 )
583
- child .SelectedTexture :Point (' BOTTOMRIGHT' , - 1 , 2 )
584
- child .SelectedTexture :CreateBackdrop (' Transparent' )
585
-
586
- child .IsSkinned = true
587
- end
588
- end
589
- end )
609
+ hooksecurefunc (SetsCollectionFrame .ListContainer .ScrollBox , ' Update' , SetsFrame_ScrollBoxUpdate )
590
610
591
611
local DetailsFrame = SetsCollectionFrame .DetailsFrame
592
612
DetailsFrame .ModelFadeTexture :Hide ()
@@ -595,22 +615,7 @@ local function SkinTransmogFrames()
595
615
DetailsFrame .LongName :FontTemplate (nil , 16 )
596
616
S :HandleButton (DetailsFrame .VariantSetsButton )
597
617
598
- hooksecurefunc (SetsCollectionFrame , ' SetItemFrameQuality' , function (_ , itemFrame )
599
- local icon = itemFrame .Icon
600
- if not icon .backdrop then
601
- icon :CreateBackdrop ()
602
- icon :SetTexCoord (unpack (E .TexCoords ))
603
- itemFrame .IconBorder :Hide ()
604
- end
605
-
606
- if itemFrame .collected then
607
- local quality = C_TransmogCollection_GetSourceInfo (itemFrame .sourceID ).quality
608
- local color = BAG_ITEM_QUALITY_COLORS [quality or 1 ]
609
- icon .backdrop :SetBackdropBorderColor (color .r , color .g , color .b )
610
- else
611
- icon .backdrop :SetBackdropBorderColor (unpack (E .media .bordercolor ))
612
- end
613
- end )
618
+ hooksecurefunc (SetsCollectionFrame , ' SetItemFrameQuality' , SetsFrame_SetItemFrameQuality )
614
619
615
620
_G .WardrobeSetsCollectionVariantSetsButton .Icon :SetTexture (E .Media .Textures .ArrowUp )
616
621
_G .WardrobeSetsCollectionVariantSetsButton .Icon :SetRotation (S .ArrowRotation .down )
0 commit comments