View Single Post
12-10-13, 04:42 PM   #5
Vrul
A Scalebane Royal Guard
 
Vrul's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 404
Untested but try replacing nUI_MicroMenu.applyScale with:
Code:
nUI_MicroMenu.applyScale = function( scale )
--  nUI_ProfileStart( ProfileCounter, "applyScale" );
    local options  = frame.options;
    local anchor   = scale and frame.anchor or nil;	
    local scale    = scale or frame.scale or 1;
    local btn_size = options.btn_size * scale * nUI.vScale;
    local btn_gap  = options.btn_gap * scale * nUI.hScale;
    frame.scale = scale;

    if frame.btn_size ~= btn_size or frame.btn_gap ~= btn_gap then
        local frame_Buttons = frame.Buttons;
        local width = #frame_Buttons > 0 and -btn_gap or 0;

        for i = 1, #frame_Buttons do
            frame_Buttons[i]:ClearAllPoints();
        end

        for i = 1, #frame_Buttons do
            local button    = frame_Buttons[i];
            local btnWidth  = button:GetWidth();
            local btn_scale = btn_size / btnWidth;
            width = width + (btnWidth+0.6) * btn_scale + btn_gap;
            button:SetScale( btn_scale  );
            if i > 1 then 
                button:SetPoint( "LEFT", frame_Buttons[i - 1], "RIGHT", btn_gap, 0 );
            else
                button:SetPoint( "BOTTOMLEFT", frame, "BOTTOMLEFT", 3 * scale * nUI.hScale, 3 * scale * nUI.vScale );				
            end
        end	

        frame:SetHeight( btn_size + 6 * scale * nUI.vScale );
        frame:SetWidth( width + 6 * scale * nUI.hScale );
    end
--  nUI_ProfileStop();
end