Available Workspaces Look and Feel Improved
This commit is contained in:
1 parent
543aac058c
commit
0f0ede81b2
2 files changed
+20
-7
No files matched your search
@@ -2,7 +2,7 @@ function newListItem() {
|
||||
const MODULE_NAME = 'List Item'
|
||||
const ERROR_LOG = true
|
||||
const logger = newWebDebugLog()
|
||||
|
||||
|
||||
|
||||
let thisObject = {
|
||||
container: undefined,
|
||||
@@ -21,8 +21,9 @@ function newListItem() {
|
||||
thisObject.container.detectMouseOver = true
|
||||
thisObject.container.isClickeable = true
|
||||
thisObject.container.frame.width = SIDE_PANEL_WIDTH * 0.75
|
||||
thisObject.container.frame.height = SIDE_PANEL_WIDTH * 0.75
|
||||
thisObject.container.frame.height = SIDE_PANEL_WIDTH * 0.40
|
||||
|
||||
let prefix = "User "
|
||||
let name
|
||||
let project
|
||||
let type
|
||||
@@ -49,6 +50,12 @@ function newListItem() {
|
||||
project = pProject
|
||||
type = pType
|
||||
|
||||
let splittedName = name.split('→')
|
||||
if (splittedName.length === 2) {
|
||||
name = splittedName[1]
|
||||
prefix = splittedName[0]
|
||||
}
|
||||
|
||||
onMouseOverEventSubscriptionId = thisObject.container.eventHandler.listenToEvent('onMouseOver', onMouseOver)
|
||||
onMouseNotOverEventSubscriptionId = thisObject.container.eventHandler.listenToEvent('onMouseNotOver', onMouseNotOver)
|
||||
onMouseClickEventSubscriptionId = thisObject.container.eventHandler.listenToEvent('onMouseClick', onMouseClick)
|
||||
@@ -78,9 +85,15 @@ function newListItem() {
|
||||
|
||||
function draw() {
|
||||
let icon = UI.projects.superalgos.spaces.designSpace.getIconByProjectAndType('Superalgos', type)
|
||||
let backgroundColor = UI_COLOR.BLACK
|
||||
let backgroundColor
|
||||
let labelColor
|
||||
|
||||
if (prefix === "User ") {
|
||||
backgroundColor = UI_COLOR.BLACK
|
||||
} else {
|
||||
backgroundColor = UI_COLOR.RUSTED_RED
|
||||
}
|
||||
|
||||
const RED_LINE_HIGHT = 4
|
||||
const OPACITY = 1
|
||||
|
||||
@@ -102,8 +115,8 @@ function newListItem() {
|
||||
|
||||
UI.projects.superalgos.utilities.drawPrint.roundedCornersBackground(params)
|
||||
|
||||
UI.projects.superalgos.utilities.drawPrint.drawLabel(name, 1 / 2, 3.0 / 10, -5, 0, 15, thisObject.container, labelColor)
|
||||
UI.projects.superalgos.utilities.drawPrint.drawLabel(type, 1 / 2, 7.2 / 10, -5, 0, 15, thisObject.container, labelColor)
|
||||
UI.projects.superalgos.utilities.drawPrint.drawIcon(icon, 1 / 2, 1 / 2, 0, 0, 80, thisObject.container)
|
||||
UI.projects.superalgos.utilities.drawPrint.drawLabel(name, 1 / 2, 2.5 / 10, -5, 0, 15, thisObject.container, labelColor)
|
||||
UI.projects.superalgos.utilities.drawPrint.drawLabel(prefix + type, 1 / 2, 8.5 / 10, -5, 0, 15, thisObject.container, labelColor)
|
||||
UI.projects.superalgos.utilities.drawPrint.drawIcon(icon, 1 / 2, 1 / 2, 0, 0, 50, thisObject.container)
|
||||
}
|
||||
}
|
||||
@@ -34,7 +34,7 @@ function newListView() {
|
||||
|
||||
let headerHeight = 40
|
||||
let footerHeight = 30
|
||||
let listItemHeight = SIDE_PANEL_WIDTH * 0.75
|
||||
let listItemHeight = SIDE_PANEL_WIDTH * 0.40
|
||||
|
||||
let posibleVisibleListItems
|
||||
|
||||
|
||||
Reference in new issue
Block a user