Start working in toolbar

This commit is contained in:
Francesco Abbate 2021-02-11 18:37:34 +01:00
parent cd018170a0
commit 7137f88b4c
3 changed files with 481 additions and 0 deletions

BIN
data/fonts/fontello.ttf Normal file

Binary file not shown.

33
data/plugins/toolbar.lua Normal file
View File

@ -0,0 +1,33 @@
local core = require "core"
local common = require "core.common"
local command = require "core.command"
-- local config = require "core.config"
local style = require "core.style"
-- local DocView = require "core.docview"
local View = require "core.view"
local ToolbarView = View:extend()
local toolbar_commands = {
{"f", "core:open-file"},
{"S", "doc:save"},
{"L", "core:find-file"},
}
function ToolbarView:new()
ToolbarView.super.new(self)
end
function ToolbarView:update()
self.size.y = style.icon_font:get_height() + style.padding.y * 2
if system.get_time() < self.message_timeout then
self.scroll.to.y = self.size.y
else
self.scroll.to.y = 0
end
ToolbarView.super.update(self)
end

448
fontello-config.json Normal file
View File

@ -0,0 +1,448 @@
{
"name": "",
"css_prefix_text": "icon-",
"css_use_suffix": false,
"hinting": true,
"units_per_em": 1000,
"ascent": 850,
"glyphs": [
{
"uid": "9dd9e835aebe1060ba7190ad2b2ed951",
"css": "search-1",
"code": 76,
"src": "fontawesome"
},
{
"uid": "12f4ece88e46abd864e40b35e05b11cd",
"css": "ok-1",
"code": 59402,
"src": "fontawesome"
},
{
"uid": "43ab845088317bd348dee1d975700c48",
"css": "ok-circled-1",
"code": 59403,
"src": "fontawesome"
},
{
"uid": "ad33e708f4d2e25c5056c931da1528d6",
"css": "ok-circled2",
"code": 59405,
"src": "fontawesome"
},
{
"uid": "1400d5103edd2fa6d2d61688fee79a5a",
"css": "ok-squared",
"code": 61770,
"src": "fontawesome"
},
{
"uid": "5211af474d3a9848f67f945e2ccaf143",
"css": "cancel-1",
"code": 67,
"src": "fontawesome"
},
{
"uid": "0f4cae16f34ae243a6144c18a003f2d8",
"css": "cancel-circled-1",
"code": 99,
"src": "fontawesome"
},
{
"uid": "d7271d490b71df4311e32cdacae8b331",
"css": "home-1",
"code": 59407,
"src": "fontawesome"
},
{
"uid": "3d4ea8a78dc34efe891f3a0f3d961274",
"css": "info",
"code": 61737,
"src": "fontawesome"
},
{
"uid": "ce3cf091d6ebd004dd0b52d24074e6e3",
"css": "help",
"code": 61736,
"src": "fontawesome"
},
{
"uid": "17ebadd1e3f274ff0205601eef7b9cc4",
"css": "help-circled-1",
"code": 59408,
"src": "fontawesome"
},
{
"uid": "e82cedfa1d5f15b00c5a81c9bd731ea2",
"css": "info-circled-1",
"code": 59409,
"src": "fontawesome"
},
{
"uid": "c1f1975c885aa9f3dad7810c53b82074",
"css": "lock",
"code": 59410,
"src": "fontawesome"
},
{
"uid": "657ab647f6248a6b57a5b893beaf35a9",
"css": "lock-open-1",
"code": 59411,
"src": "fontawesome"
},
{
"uid": "05376be04a27d5a46e855a233d6e8508",
"css": "lock-open-alt-1",
"code": 61758,
"src": "fontawesome"
},
{
"uid": "3db5347bd219f3bce6025780f5d9ef45",
"css": "tag",
"code": 59412,
"src": "fontawesome"
},
{
"uid": "a3f89e106175a5c5c4e9738870b12e55",
"css": "tags",
"code": 59413,
"src": "fontawesome"
},
{
"uid": "7034e4d22866af82bef811f52fb1ba46",
"css": "code",
"code": 61729,
"src": "fontawesome"
},
{
"uid": "d35a1d35efeb784d1dc9ac18b9b6c2b6",
"css": "pencil-1",
"code": 59414,
"src": "fontawesome"
},
{
"uid": "44fae3bfdd54754dc68ec50d37efea37",
"css": "pencil-squared",
"code": 61771,
"src": "fontawesome"
},
{
"uid": "41087bc74d4b20b55059c60a33bf4008",
"css": "edit",
"code": 59415,
"src": "fontawesome"
},
{
"uid": "ecb97add13804c190456025e43ec003b",
"css": "keyboard",
"code": 61724,
"src": "fontawesome"
},
{
"uid": "c76b7947c957c9b78b11741173c8349b",
"css": "attention-1",
"code": 33,
"src": "fontawesome"
},
{
"uid": "00391fac5d419345ffcccd95b6f76263",
"css": "attention-alt-1",
"code": 61738,
"src": "fontawesome"
},
{
"uid": "b035c28eba2b35c6ffe92aee8b0df507",
"css": "attention-circled",
"code": 59417,
"src": "fontawesome"
},
{
"uid": "f48ae54adfb27d8ada53d0fd9e34ee10",
"css": "trash-empty",
"code": 59418,
"src": "fontawesome"
},
{
"uid": "1b5a5d7b7e3c71437f5a26befdd045ed",
"css": "doc-1",
"code": 102,
"src": "fontawesome"
},
{
"uid": "c8585e1e5b0467f28b70bce765d5840c",
"css": "docs",
"code": 61637,
"src": "fontawesome"
},
{
"uid": "5408be43f7c42bccee419c6be53fdef5",
"css": "doc-text",
"code": 61686,
"src": "fontawesome"
},
{
"uid": "178053298e3e5b03551d754d4b9acd8b",
"css": "doc-inv",
"code": 61787,
"src": "fontawesome"
},
{
"uid": "c08a1cde48d96cba21d8c05fa7d7feb1",
"css": "doc-text-inv",
"code": 61788,
"src": "fontawesome"
},
{
"uid": "9daa1fdf0838118518a7e22715e83abc",
"css": "file-pdf",
"code": 61889,
"src": "fontawesome"
},
{
"uid": "310ffd629da85142bc8669f010556f2d",
"css": "file-word",
"code": 61890,
"src": "fontawesome"
},
{
"uid": "edcd4022de8d8df266ef7c42d2658ca5",
"css": "file-powerpoint",
"code": 61892,
"src": "fontawesome"
},
{
"uid": "3c961c1a8d874815856fc6637dc5a13c",
"css": "file-image",
"code": 61893,
"src": "fontawesome"
},
{
"uid": "e80ae555c1413a4ec18b33fb348b4049",
"css": "file-archive",
"code": 61894,
"src": "fontawesome"
},
{
"uid": "81db033e704eb7c586a365559d7c0f36",
"css": "file-audio",
"code": 61895,
"src": "fontawesome"
},
{
"uid": "dd69d9aa589ea7bc0a82a3fe67039f4b",
"css": "file-video",
"code": 61896,
"src": "fontawesome"
},
{
"uid": "26613a2e6bc41593c54bead46f8c8ee3",
"css": "file-code",
"code": 61897,
"src": "fontawesome"
},
{
"uid": "f8aa663c489bcbd6e68ec8147dca841e",
"css": "folder-1",
"code": 100,
"src": "fontawesome"
},
{
"uid": "c95735c17a10af81448c7fed98a04546",
"css": "folder-open-1",
"code": 68,
"src": "fontawesome"
},
{
"uid": "b091a8bd0fdade174951f17d936f51e4",
"css": "folder-empty-1",
"code": 61716,
"src": "fontawesome"
},
{
"uid": "6533bdc16ab201eb3f3b27ce989cab33",
"css": "folder-open-empty-1",
"code": 61717,
"src": "fontawesome"
},
{
"uid": "559647a6f430b3aeadbecd67194451dd",
"css": "menu-1",
"code": 61641,
"src": "fontawesome"
},
{
"uid": "e99461abfef3923546da8d745372c995",
"css": "cog",
"code": 59422,
"src": "fontawesome"
},
{
"uid": "98687378abd1faf8f6af97c254eb6cd6",
"css": "cog-alt",
"code": 59423,
"src": "fontawesome"
},
{
"uid": "5bb103cd29de77e0e06a52638527b575",
"css": "wrench",
"code": 59424,
"src": "fontawesome"
},
{
"uid": "0b2b66e526028a6972d51a6f10281b4b",
"css": "zoom-in",
"code": 59425,
"src": "fontawesome"
},
{
"uid": "d25d10efa900f529ad1d275657cfd30e",
"css": "zoom-out",
"code": 59426,
"src": "fontawesome"
},
{
"uid": "f3f90c8c89795da30f7444634476ea4f",
"css": "angle-left",
"code": 61700,
"src": "fontawesome"
},
{
"uid": "7bf14281af5633a597f85b061ef1cfb9",
"css": "angle-right",
"code": 43,
"src": "fontawesome"
},
{
"uid": "5de9370846a26947e03f63142a3f1c07",
"css": "angle-up",
"code": 61701,
"src": "fontawesome"
},
{
"uid": "e4dde1992f787163e2e2b534b8c8067d",
"css": "angle-down",
"code": 45,
"src": "fontawesome"
},
{
"uid": "bbfb51903f40597f0b70fd75bc7b5cac",
"css": "trash",
"code": 61944,
"src": "fontawesome"
},
{
"uid": "ea2d9a8c51ca42b38ef0d2a07f16d9a7",
"css": "chart-line",
"code": 103,
"src": "fontawesome"
},
{
"uid": "f4445feb55521283572ee88bc304f928",
"css": "floppy",
"code": 83,
"src": "fontawesome"
},
{
"uid": "b429436ec5a518c78479d44ef18dbd60",
"css": "paste",
"code": 61674,
"src": "fontawesome"
},
{
"uid": "8772331a9fec983cdb5d72902a6f9e0e",
"css": "scissors",
"code": 59428,
"src": "fontawesome"
},
{
"uid": "9755f76110ae4d12ac5f9466c9152031",
"css": "book",
"code": 59429,
"src": "fontawesome"
},
{
"uid": "f9cbf7508cd04145ade2800169959eef",
"css": "font",
"code": 59430,
"src": "fontawesome"
},
{
"uid": "d3b3f17bc3eb7cd809a07bbd4d178bee",
"css": "resize-vertical",
"code": 59431,
"src": "fontawesome"
},
{
"uid": "3c73d058e4589b65a8d959c0fc8f153d",
"css": "resize-horizontal",
"code": 59432,
"src": "fontawesome"
},
{
"uid": "e594fc6e5870b4ab7e49f52571d52577",
"css": "resize-full",
"code": 59433,
"src": "fontawesome"
},
{
"uid": "5278ef7773e948d56c4d442c8c8c98cf",
"css": "lightbulb",
"code": 61675,
"src": "fontawesome"
},
{
"uid": "598a5f2bcf3521d1615de8e1881ccd17",
"css": "clock",
"code": 59434,
"src": "fontawesome"
},
{
"uid": "1c4068ed75209e21af36017df8871802",
"css": "down-big",
"code": 59435,
"src": "fontawesome"
},
{
"uid": "555ef8c86832e686fef85f7af2eb7cde",
"css": "left-big",
"code": 59436,
"src": "fontawesome"
},
{
"uid": "ad6b3fbb5324abe71a9c0b6609cbb9f1",
"css": "right-big",
"code": 59437,
"src": "fontawesome"
},
{
"uid": "95376bf082bfec6ce06ea1cda7bd7ead",
"css": "up-big",
"code": 59438,
"src": "fontawesome"
},
{
"uid": "107ce08c7231097c7447d8f4d059b55f",
"css": "ellipsis",
"code": 61761,
"src": "fontawesome"
},
{
"uid": "750058837a91edae64b03d60fc7e81a7",
"css": "ellipsis-vert",
"code": 61762,
"src": "fontawesome"
},
{
"uid": "8fb55fd696d9a0f58f3b27c1d8633750",
"css": "table",
"code": 61646,
"src": "fontawesome"
},
{
"uid": "53dd31a6cc6438192b2d7b09b1c1dd45",
"css": "columns",
"code": 61659,
"src": "fontawesome"
}
]
}