Update os-gui to 0.2.2
parent
e142e4c695
commit
90a5ad4a8f
|
@ -89,8 +89,8 @@ function $MenuBar(menus){
|
|||
const rect = $item[0].getBoundingClientRect();
|
||||
$submenu_popup.css({
|
||||
position: "absolute",
|
||||
left: rect.right,
|
||||
top: rect.top,
|
||||
left: rect.right + window.scrollX,
|
||||
top: rect.top + window.scrollY,
|
||||
});
|
||||
let submenu_popup_rect = $submenu_popup[0].getBoundingClientRect();
|
||||
if (submenu_popup_rect.right > innerWidth) {
|
||||
|
|
|
@ -258,15 +258,15 @@ function $Window(options){
|
|||
|
||||
$w.applyBounds = function(){
|
||||
$w.css({
|
||||
left: Math.max(0, Math.min(innerWidth - $w.width(), $w.position().left)),
|
||||
top: Math.max(0, Math.min(innerHeight - $w.height(), $w.position().top)),
|
||||
left: Math.max(0, Math.min(document.body.scrollWidth - $w.width(), $w.position().left)),
|
||||
top: Math.max(0, Math.min(document.body.scrollHeight - $w.height(), $w.position().top)),
|
||||
});
|
||||
};
|
||||
|
||||
$w.center = function(){
|
||||
$w.css({
|
||||
left: (innerWidth - $w.width()) / 2,
|
||||
top: (innerHeight - $w.height()) / 2,
|
||||
left: (innerWidth - $w.width()) / 2 + window.scrollX,
|
||||
top: (innerHeight - $w.height()) / 2 + window.scrollY,
|
||||
});
|
||||
$w.applyBounds();
|
||||
};
|
||||
|
@ -275,10 +275,13 @@ function $Window(options){
|
|||
$G.on("resize", $w.applyBounds);
|
||||
|
||||
var drag_offset_x, drag_offset_y;
|
||||
var drag = function(e){
|
||||
var mouse_x, mouse_y;
|
||||
var update_drag = function(e){
|
||||
mouse_x = e.clientX != null ? e.clientX : mouse_x;
|
||||
mouse_y = e.clientY != null ? e.clientY : mouse_y;
|
||||
$w.css({
|
||||
left: e.clientX - drag_offset_x,
|
||||
top: e.clientY - drag_offset_y,
|
||||
left: mouse_x + scrollX - drag_offset_x,
|
||||
top: mouse_y + scrollY - drag_offset_y,
|
||||
});
|
||||
};
|
||||
$w.$titlebar.attr("touch-action", "none");
|
||||
|
@ -292,13 +295,15 @@ function $Window(options){
|
|||
if ($w.hasClass("maximized")) {
|
||||
return;
|
||||
}
|
||||
drag_offset_x = e.clientX - $w.position().left;
|
||||
drag_offset_y = e.clientY - $w.position().top;
|
||||
$G.on("pointermove", drag);
|
||||
drag_offset_x = e.clientX + scrollX - $w.position().left;
|
||||
drag_offset_y = e.clientY + scrollY - $w.position().top;
|
||||
$G.on("pointermove", update_drag);
|
||||
$G.on("scroll", update_drag);
|
||||
$("body").addClass("dragging"); // for when mouse goes over an iframe
|
||||
});
|
||||
$G.on("pointerup", function(e){
|
||||
$G.off("pointermove", drag);
|
||||
$G.off("pointermove", update_drag);
|
||||
$G.off("scroll", update_drag);
|
||||
$("body").removeClass("dragging");
|
||||
$w.applyBounds();
|
||||
});
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
/* Source: https://www.deviantart.com/tpenguinltg/art/Blue-525167751 */
|
||||
/* License: https://creativecommons.org/licenses/by-sa/3.0/ */
|
||||
/* This is a generated file. */
|
||||
:root {
|
||||
--checker: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAG0lEQVQYV2O8/OTH/8vPfjAwLjv14b+uFAcDAG90ChC/AKc5AAAAAElFTkSuQmCC");
|
||||
--button-active-border-image: url("data:image/svg+xml,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22256px%22%20height%3D%22256px%22%20viewBox%3D%220%200%20256%20256%22%3E%0A%09%09%09%0A%09%09%3Cpath%20d%3D%22M0%200h256v256h-256v-256z%22%20fill%3D%22rgb(0%2C%200%2C%200)%22%2F%3E%0A%09%09%3Cpath%20d%3D%22M32%2032h192v192h-192v-192z%22%20fill%3D%22rgb(49%2C%20131%2C%20221)%22%2F%3E%0A%09%09%3Cpath%20d%3D%22M64%2064h128v128h-128v-128z%22%20fill%3D%22rgb(166%2C%20202%2C%20240)%22%2F%3E%0A%09%0A%09%09%3C%2Fsvg%3E") 64 / 2px;
|
||||
--button-normal-border-image: url("data:image/svg+xml,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22256px%22%20height%3D%22256px%22%20viewBox%3D%220%200%20256%20256%22%3E%0A%09%09%09%0A%09%09%3Cpath%20d%3D%22M0%200h224v32h-192v192h-32v-224z%22%20fill%3D%22rgb(211%2C%20228%2C%20248)%22%2F%3E%0A%09%09%3Cpath%20d%3D%22M224%200h32v256h-256v-32h224v-224z%22%20fill%3D%22rgb(0%2C%200%2C%200)%22%2F%3E%0A%09%09%3Cpath%20d%3D%22M32%2032h160v32h-128v128h-32v-160z%22%20fill%3D%22rgb(166%2C%20202%2C%20240)%22%2F%3E%0A%09%09%3Cpath%20d%3D%22M192%2032h32v192h-192v-32h160v-160z%22%20fill%3D%22rgb(49%2C%20131%2C%20221)%22%2F%3E%0A%09%09%3Cpath%20d%3D%22M64%2064h128v128h-128v-128z%22%20fill%3D%22rgb(166%2C%20202%2C%20240)%22%2F%3E%0A%09%0A%09%09%3C%2Fsvg%3E") 64 / 2px;
|
||||
--inset-deep-border-image: url("data:image/svg+xml,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22256px%22%20height%3D%22256px%22%20viewBox%3D%220%200%20256%20256%22%3E%0A%09%09%09%0A%09%09%3Cpath%20d%3D%22M0%200h224v32h-192v192h-32v-224z%22%20fill%3D%22rgb(0%2C%200%2C%200)%22%2F%3E%0A%09%09%3Cpath%20d%3D%22M224%200h32v256h-256v-32h224v-224z%22%20fill%3D%22rgb(211%2C%20228%2C%20248)%22%2F%3E%0A%09%09%3Cpath%20d%3D%22M32%2032h160v32h-128v128h-32v-160z%22%20fill%3D%22rgb(49%2C%20131%2C%20221)%22%2F%3E%0A%09%09%3Cpath%20d%3D%22M192%2032h32v192h-192v-32h160v-160z%22%20fill%3D%22rgb(166%2C%20202%2C%20240)%22%2F%3E%0A%09%09%3Cpath%20d%3D%22M64%2064h128v128h-128v-128z%22%20fill%3D%22rgb(166%2C%20202%2C%20240)%22%2F%3E%0A%09%0A%09%09%3C%2Fsvg%3E") 64 / 2px;
|
||||
--button-default-border-image: url("data:image/svg+xml,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22256px%22%20height%3D%22256px%22%20viewBox%3D%220%200%20256%20256%22%3E%0A%09%09%09%0A%09%09%3Cpath%20d%3D%22M0%200h256v256h-256v-256z%22%20fill%3D%22rgb(0%2C%200%2C%200)%22%2F%3E%0A%09%09%3Cpath%20d%3D%22M32%2032h160v32h-128v128h-32v-160z%22%20fill%3D%22rgb(211%2C%20228%2C%20248)%22%2F%3E%0A%09%09%3Cpath%20d%3D%22M64%2064h96v32h-64v64h-32v-96z%22%20fill%3D%22rgb(166%2C%20202%2C%20240)%22%2F%3E%0A%09%09%3Cpath%20d%3D%22M160%2064h32v128h-128v-32h96v-96z%22%20fill%3D%22rgb(49%2C%20131%2C%20221)%22%2F%3E%0A%09%09%3Cpath%20d%3D%22M96%2096h64v64h-64v-64z%22%20fill%3D%22rgb(166%2C%20202%2C%20240)%22%2F%3E%0A%09%09%3Crect%20x%3D%220%22%20y%3D%220%22%20width%3D%22256%22%20height%3D%22256%22%20stroke-width%3D%2264%22%20stroke%3D%22rgb(0%2C%200%2C%200)%22%20fill%3D%22none%22%2F%3E%0A%09%0A%09%09%3C%2Fsvg%3E") 96 / 3px;
|
||||
--button-default-active-border-image: url("data:image/svg+xml,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22256px%22%20height%3D%22256px%22%20viewBox%3D%220%200%20256%20256%22%3E%0A%09%09%09%0A%09%09%3Cpath%20d%3D%22M0%200h256v256h-256v-256z%22%20fill%3D%22rgb(0%2C%200%2C%200)%22%2F%3E%0A%09%09%3Cpath%20d%3D%22M32%2032h192v192h-192v-192z%22%20fill%3D%22rgb(49%2C%20131%2C%20221)%22%2F%3E%0A%09%09%3Cpath%20d%3D%22M64%2064h128v128h-128v-128z%22%20fill%3D%22rgb(166%2C%20202%2C%20240)%22%2F%3E%0A%09%09%3Crect%20x%3D%220%22%20y%3D%220%22%20width%3D%22256%22%20height%3D%22256%22%20stroke-width%3D%2264%22%20stroke%3D%22rgb(0%2C%200%2C%200)%22%20fill%3D%22none%22%2F%3E%0A%09%0A%09%09%3C%2Fsvg%3E") 64 / 2px;
|
||||
--scrollbar-arrows-ButtonText: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAJCAYAAABaMo5wAAAAW0lEQVQ4T2NkGGSAcZC5h4FWDvrPwEC02ShqkR0EkkAHuBxMyEKYWYQ8jKEOXQOyo/A5BuZwqqvBZiA+3xMbilQLIWqlcUJRimwPzjRELcdQZA6hREeR4eRoBgBoXhAK6oiMhwAAAABJRU5ErkJggg==");
|
||||
--scrollbar-arrows-GrayText: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAJCAYAAABaMo5wAAAAYElEQVQ4T2NkGGSAcZC5h4EmDjJsvvv/fK0yUWajq4VrAkmghxYuQwlZCDOLkKOwqUPxBbKj8DkG5nBaqMEIVny+JzYUqRZC1ErghKIU2R6caYhajqHUHKJyAqWWkKIfANj2QArAsbtdAAAAAElFTkSuQmCC");
|
||||
--scrollbar-arrows-ButtonHilight: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAJCAYAAABaMo5wAAAAYElEQVQ4T2NkGGSAcZC5h4EmDrr85Md/XRkOosxGVwvXBJJADy1chhKyEGYWIUdhU4fiC2RH4XMMzOG0UIMRrPh8T2woUi2EqJXACUUpsj040xC1HEOpOUTlBEotIUU/AHnlQApCJ0jDAAAAAElFTkSuQmCC");
|
||||
--scrollbar-size: 13px;
|
||||
--scrollbar-button-inner-size: 9px;
|
||||
--ActiveTitle: rgb(0, 0, 128);
|
||||
--Background: rgb(58, 110, 165);
|
||||
--Hilight: rgb(51, 153, 255);
|
||||
--HilightText: rgb(255, 255, 255);
|
||||
--TitleText: rgb(255, 255, 255);
|
||||
--Window: rgb(255, 255, 255);
|
||||
--WindowText: rgb(0, 0, 0);
|
||||
--Scrollbar: rgb(211, 228, 248);
|
||||
--InactiveTitle: rgb(49, 131, 221);
|
||||
--Menu: rgb(166, 202, 240);
|
||||
--WindowFrame: rgb(0, 0, 0);
|
||||
--MenuText: rgb(0, 0, 0);
|
||||
--ActiveBorder: rgb(166, 202, 240);
|
||||
--InactiveBorder: rgb(166, 202, 240);
|
||||
--AppWorkspace: rgb(49, 131, 221);
|
||||
--ButtonFace: rgb(166, 202, 240);
|
||||
--ButtonShadow: rgb(49, 131, 221);
|
||||
--GrayText: rgb(49, 131, 221);
|
||||
--ButtonText: rgb(0, 0, 0);
|
||||
--InactiveTitleText: rgb(0, 0, 128);
|
||||
--ButtonHilight: rgb(211, 228, 248);
|
||||
--ButtonDkShadow: rgb(0, 0, 0);
|
||||
--ButtonLight: rgb(166, 202, 240);
|
||||
--InfoText: rgb(0, 0, 0);
|
||||
--InfoWindow: rgb(225, 225, 255);
|
||||
--GradientActiveTitle: rgb(16, 132, 208);
|
||||
--GradientInactiveTitle: rgb(49, 131, 221);
|
||||
--ButtonAlternateFace: rgb(192, 192, 192);
|
||||
--HotTrackingColor: rgb(0, 0, 128);
|
||||
--MenuHilight: rgb(0, 0, 128);
|
||||
--MenuBar: rgb(166, 202, 240);
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=blue.css.map */
|
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,5 @@
|
|||
/* https://www.deviantart.com/tpenguinltg/art/Peggy-s-Pastels-505540096 */
|
||||
/* Source: https://www.deviantart.com/tpenguinltg/art/Peggy-s-Pastels-505540096 */
|
||||
/* License: https://creativecommons.org/licenses/by-sa/3.0/ */
|
||||
/* This is a generated file. */
|
||||
:root {
|
||||
--checker: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAG0lEQVQYV2P89eDJ/18PnzEwfjl46j+bvBQDAHJ8Cj5el2f8AAAAAElFTkSuQmCC");
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -395,6 +395,11 @@ body > .window-titlebar {
|
|||
margin-bottom: 1px;
|
||||
}
|
||||
.menu-button {
|
||||
box-sizing: border-box;
|
||||
height: 18px;
|
||||
line-height: 1;
|
||||
margin-top: 1px;
|
||||
margin-bottom: 1px;
|
||||
padding: 2px 5px;
|
||||
position: relative;
|
||||
outline: 0;
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue