1
0
mirror of https://shylinux.com/x/icebergs synced 2025-06-26 02:17:30 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2025-05-31 12:53:31 +08:00
parent 1d591dc2f2
commit 3d5a29b5f3
3 changed files with 24 additions and 4 deletions

View File

@ -63,6 +63,7 @@ fieldset.desktop>div.output>div.desktop>fieldset.web.chat.location>div.action>di
fieldset.desktop>div.output>div.desktop>fieldset.web.chat.location>div.action>div.item.style select { width:80px; }
fieldset.desktop>div.output>div.desktop>fieldset.web.chat.location>div.action>div.item.feature select { width:60px; }
fieldset.desktop>div.output>div.desktop>fieldset.web.chat.macos.finder>div.action { display:none; }
fieldset.desktop>div.output>div.desktop>fieldset.web.chat.iframe.portal>div.action { display:none; }
fieldset.desktop>div.output>div.desktop>fieldset.web.chat.macos.finder>div.status { display:none; }
fieldset.desktop>div.output>div.desktop>fieldset.web.chat.macos.finder>div.output div.item.disable { display:none; }
fieldset.desktop>div.output>fieldset.web.chat.macos.dock>div.output div.item.disable { display:none; }

View File

@ -77,9 +77,16 @@ Volcanos(chat.ONIMPORT, {
}) }) },
_window: function(can, item, cb) { if (!item.index) { return }
item.height = can.base.Max(html.DESKTOP_HEIGHT, can.ConfHeight()-125), item.width = can.base.Max(html.DESKTOP_WIDTH, can.ConfWidth())
item.left = (can.ConfWidth()-item.width)/2, item.top = (can.ConfHeight()-item.height-125)/4+25
item.left = (can.ConfWidth()-item.width)/2, item.top = can.base.Min((can.ConfHeight()-item.height-125)/4+25, 25)
var style = item.style
if (item.index == web.CHAT_IFRAME && item.style == "portal") {
// item.title = "ContextOS",
item.width = 390, item.height = can.base.Max(844, can.ConfHeight()-25)
item.left = can.ConfWidth()-item.width, item.top = 25
}
item.type = html.PLUGIN, item.style = {left: item.left, top: item.top, height: item.height, width: item.width}
can.onappend.plugin(can, item, function(sub) {
can.onappend.style(sub, style)
var index = 0; can.core.Item({
close: {color: "#f95f57", inner: "x", onclick: function(event) { sub.onaction._close(event, sub) }},
small: {color: "#fcbc2f", inner: "-", onclick: function(event) { var dock = can.page.Append(can, can.ui.dock._output, [{view: html.ITEM, list: [{view: html.ICON, list: [{img: can.misc.PathJoin(item.icon)}]}], onclick: function() {
@ -89,7 +96,10 @@ Volcanos(chat.ONIMPORT, {
}, function(name, item) {
can.page.insertBefore(can, [{view: [[html.ITEM, html.BUTTON, "window", name], ""], title: name, list: [{text: item.inner}], style: {"background-color": item.color, right: 10+25*index++}, onclick: item.onclick}], sub._output)
})
sub.onimport._open = function(sub, msg, arg) { can.onimport._window(can, {title: msg.Option(html.TITLE), index: web.CHAT_IFRAME, args: [arg]}) }
sub.onimport._open = function(sub, msg, arg) {
can.onimport._window(can, {title: msg.Option(html.TITLE), style: msg.Option("style"), index: web.CHAT_IFRAME, args: [arg]})
}
sub.onimport._field = function(sub, msg) { msg.Table(function(item) { can.onimport._window(can, item) }) }
sub.onaction._close = function() { can.page.Remove(can, sub._target), can.onexport.tabs(can) }
sub.onappend.dock = function(item) { can.ui.dock.runAction(can.request(event, item), mdb.CREATE, [], function() { can.ui.dock.Update() }) }

View File

@ -37,6 +37,7 @@ func (s *Label) Draw(m *ice.Message, x, y int) wiki.Chart {
wiki.AddGroupOption(m, TEXT, wiki.STROKE, m.Option(wiki.STROKE), wiki.FILL, m.Option(wiki.STROKE))
defer gs.DumpAll(m, RECT, TEXT)
top := y
mod := kit.Int(m.Option("order.mod"))
for _, line := range s.data {
left, height := x, 0
for i, text := range line {
@ -57,9 +58,17 @@ func (s *Label) Draw(m *ice.Message, x, y int) wiki.Chart {
item.Width = s.max[i]
}
if m.Option(HIDE_BLOCK) != ice.TRUE {
gs.EchoRect(RECT, item.GetHeight(), item.GetWidth(), left+item.MarginX/2, top+item.MarginY/2)
args := []string{}
if mod > 0 && i%mod == 0 {
args = append(args, "", "", "style", `"`+kit.JoinCSS("stroke", m.Option("order.bg"), "fill", m.Option("order.bg"))+`"`)
}
gs.EchoRect(RECT, item.GetHeight(), item.GetWidth(), left+item.MarginX/2, top+item.MarginY/2, args...)
}
gs.EchoText(TEXT, left+item.GetWidths()/2, top+item.GetHeights()/2, item.Text)
args := []string{}
if mod > 0 && i%mod == 0 {
args = append(args, "style", kit.JoinCSS("stroke", m.Option("order.fg"), "fill", m.Option("order.fg")))
}
gs.EchoText(TEXT, left+item.GetWidths()/2, top+item.GetHeights()/2, item.Text, args...)
if left += item.GetWidths(); item.GetHeights() > height {
height = item.GetHeights()
}