Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Custom Icon #706

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions frames/window_main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4806,6 +4806,7 @@ function Details:InstanceRefreshRows(instance)
--icons
local no_icon = self.row_info.no_icon
local start_after_icon = self.row_info.start_after_icon
local start_after_icon_offset_x = 2
local isDesaturated = self.row_info.icon_grayscale
local icon_offset_x, icon_offset_y = unpack(self.row_info.icon_offset)
local iconMask = self.row_info.icon_mask
Expand Down Expand Up @@ -4879,7 +4880,12 @@ function Details:InstanceRefreshRows(instance)
row.icone_classe:Show()

if (start_after_icon) then
row.statusbar:SetPoint("topleft", row.icone_classe, "topright")
row.statusbar:ClearAllPoints()
row.statusbar:SetPoint("left", row.icone_classe, "right", start_after_icon_offset_x, 0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why an offset? This doesn't solve the issue as far as i understand.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The offset isn't required to solve the issue. I've added it only because it looks bad to have no space between icon and bar. I've tested the changes and they work.

row.background:ClearAllPoints()
row.background:SetAllPoints(row.statusbar)
row.overlayTexture:ClearAllPoints()
row.overlayTexture:SetAllPoints(row.statusbar)
else
row.statusbar:SetPoint("topleft", row, "topleft")
end
Expand Down Expand Up @@ -4918,7 +4924,12 @@ function Details:InstanceRefreshRows(instance)
row.icone_classe:Show()

if (start_after_icon) then
row.statusbar:SetPoint("bottomright", row.icone_classe, "bottomleft")
row.statusbar:ClearAllPoints()
row.statusbar:SetPoint("right", row.icone_classe, "left", -start_after_icon_offset_x, 0)
row.background:ClearAllPoints()
row.background:SetAllPoints(row.statusbar)
row.overlayTexture:ClearAllPoints()
row.overlayTexture:SetAllPoints(row.statusbar)
else
row.statusbar:SetPoint("bottomright", row, "bottomright")
end
Expand Down Expand Up @@ -5036,6 +5047,8 @@ function Details:InstanceRefreshRows(instance)
--backdrop
if (lineBorderEnabled) then
row.lineBorder:Show()
row.lineBorder:ClearAllPoints()
row.lineBorder:SetAllPoints(row.statusbar)
row.lineBorder:SetVertexColor(unpack(lineBorderColor))
row.lineBorder:SetBorderSizes(lineBorderSize, lineBorderSize, lineBorderSize, lineBorderSize)
row.lineBorder:UpdateSizes()
Expand Down Expand Up @@ -7424,6 +7437,7 @@ function Details:ChangeSkin(skin_name)
end

self:UpdateClickThrough()
self:ReajustaGump()
end

--update the window click through state
Expand Down