Add tab-spacing tag to MoveableTabBars
This commit is contained in:
parent
f936ab9aab
commit
8e5bbcd3a1
|
@ -6,7 +6,7 @@ local function onTabClick(tab)
|
||||||
tab.tabBar:selectTab(tab)
|
tab.tabBar:selectTab(tab)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function updateMargins(tabBar, ignored)
|
local function updateMargins(tabBar)
|
||||||
if #tabBar.tabs == 0 then return end
|
if #tabBar.tabs == 0 then return end
|
||||||
|
|
||||||
local currentMargin = 0
|
local currentMargin = 0
|
||||||
|
@ -309,8 +309,11 @@ function UIMoveableTabBar:moveTab(tab, units)
|
||||||
end
|
end
|
||||||
|
|
||||||
function UIMoveableTabBar:onStyleApply(styleName, styleNode)
|
function UIMoveableTabBar:onStyleApply(styleName, styleNode)
|
||||||
if styleNode['moveable'] then
|
if styleNode['movable'] then
|
||||||
self.tabsMoveable = styleNode['moveable']
|
self.tabsMoveable = styleNode['movable']
|
||||||
|
end
|
||||||
|
if styleNode['tab-spacing'] then
|
||||||
|
self:setTabSpacing(styleNode['tab-spacing'])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,6 @@ function init()
|
||||||
consoleContentPanel = consolePanel:getChildById('consoleContentPanel')
|
consoleContentPanel = consolePanel:getChildById('consoleContentPanel')
|
||||||
consoleTabBar = consolePanel:getChildById('consoleTabBar')
|
consoleTabBar = consolePanel:getChildById('consoleTabBar')
|
||||||
consoleTabBar:setContentWidget(consoleContentPanel)
|
consoleTabBar:setContentWidget(consoleContentPanel)
|
||||||
consoleTabBar:setTabSpacing(-1)
|
|
||||||
channels = {}
|
channels = {}
|
||||||
|
|
||||||
consolePanel.onKeyPress = function(self, keyCode, keyboardModifiers)
|
consolePanel.onKeyPress = function(self, keyCode, keyboardModifiers)
|
||||||
|
|
|
@ -81,7 +81,8 @@ Panel
|
||||||
margin-left: 5
|
margin-left: 5
|
||||||
margin-top: 3
|
margin-top: 3
|
||||||
margin-right: 5
|
margin-right: 5
|
||||||
moveable: true
|
tab-spacing: 2
|
||||||
|
movable: true
|
||||||
|
|
||||||
TabButton
|
TabButton
|
||||||
id: nextChannelButton
|
id: nextChannelButton
|
||||||
|
|
Loading…
Reference in New Issue