Files
yw4z 133dc1c8e5 Printer selection dialog redesign (#12248)
* init

* remove debug

* update

* cleanup

* update

* animate sidebar and search bar when reduce motion not enabled

* add custom snappy scrolling to fix lags

* cleanup

* update

* scroll to vendor after layout change

* improve snapping on events

* update

* match UI of setup guide
2026-05-11 02:16:13 +03:00

471 lines
8.0 KiB
CSS

#Content
{
overflow-y:auto;
padding: 0 10px 0 20px; /* ORCA Specify & Reduce horizontal paddings to fit 4 items per row */
height: 100%;
}
.OneVendorBlock {
position: relative;
margin-bottom: 7px;
}
.OneVendorBlock:last-of-type {
margin-bottom: 36px;
}
.BlockBanner
{
position: sticky;
top: 0;
left: 0;
padding: 0px;
border-bottom: 2px solid var(--main-color);
width: 100%;
display: flex;
align-items: center;
z-index: 100;
background-color: var(--bg-color-secondary);
box-sizing: border-box;
}
.BannerBtns
{
display: flex;
white-space: nowrap;
justify-content: space-around;
align-items: center;
text-align: center;
margin-right: 5px; /* ORCA align buttons with end of horizontal separator/line */
margin-left: auto;
}
.BlockBanner a
{
line-height: 30px;
height: 30px;
font-size: 17px;
font-weight: 600;
padding: 0px 10px;
color: var(--fg-color-text);
}
.BlockBanner .modelCount {
margin: 0 15px 0 auto;
font-size: 14px;
line-height: 14px;
height: 15px;
color: var(--fg-color-label);
}
.VendorCheckbox {
transform: scale(1.3);
}
.PrinterArea
{
padding: 7px 0px; /* ORCA Reduce horizontal paddings to fit 4 items per row */
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 7px;
}
.PrinterBlock
{
display: flex;
align-items: center;
text-align: center;
flex-direction: column;
gap:10px;
padding: 15px 10px 10px 10px;
background-color: var(--bg-color-secondary);
position: relative;
border: 1px solid transparent
}
.PrinterBlock:hover {
background-color: var(--focus-bg-item);
border-color:var(--main-color);
}
.PImg {
width:120px; /* ORCA use covers as 120x120px but use source file as 240x240 for better quality on hidpi */
height:120px; /* ORCA fit image to fill frame */
}
.PrinterInfo,
.PrinterInfoMark {
position: absolute;
right: 4px;
top: 4px;
opacity: 0;
border-radius: 11px;
line-height: 19px;
font-size: 14px;
}
.PrinterInfo {
--card-animation-delay: .8s; /* open info with delay on list / compact view to prevent them appear while mouse movements */
--card-info-height: fit-content;
left: 4px;
width: auto;
z-index: 9998;
height: var(--card-info-height);
border-color: var(--border-color);
background: var(--bg-color);
padding: 10px;
text-align: left;
color: var(--fg-color-text);
pointer-events: none;
}
#Content[layout="2"] .PrinterInfo {
--card-animation-delay: .3s;
--card-info-height: 116px;
}
.PrinterInfo .title {font-weight: 700}
.PrinterInfo .value {font-weight: 400}
.PrinterInfoMark:hover + .PrinterInfo {
animation: infoCard 0s forwards var(--card-animation-delay);
}
@keyframes infoCard {100% {
opacity: 1;
box-shadow: 0 5px 10px rgba(0,0,0,.2);
}}
.PrinterInfoMark {
width: 20px;
height: 20px;
background: var(--main-color);
border: 1px solid var(--main-color);
z-index: 9999;
color: #FFF;
text-align: center;
}
.PrinterBlock:hover .PrinterInfoMark {
opacity: 1;
}
.PrinterBlock:hover .PrinterInfoMark:hover {
background: var(--main-color-hover);
}
.ModelCheckBox
{
position: absolute;
height: 6px;
bottom: 0;
left: 10%;
width: 80%;
background: var(--button-bg-hover)
}
.ModelCheckBox.ModelCheckBoxSelected
{
background: var(--main-color-fixed)
}
img.ModelThumbnail
{
width: 100%;
height: 100%;
}
.PName
{
font-weight: 600;
line-height: 20px; /* ORCA */
text-align: center;
width: 100%;
color: var(--fg-color-text);
}
.pNozzel
{
display: none;
align-items: center;
justify-content:flex-start;
color: #5A5A5A;
padding-left: 0px; /* ORCA Align checkboxes with with model text */
}
.pNozzel input
{
vertical-align: middle;
margin-right: 5px;
}
.LayoutSelector {
position: absolute;
right:21px;
top:14px;
}
.LayoutSelector .TabGroup {
display: flex;
padding: 2px;
gap: 2px;
border-radius: 6px;
background-color: var(--bg-color-alt);
}
.LayoutSelector .icon16 {
opacity: .8;
}
.LayoutSelector .TabButton {
padding: 7px;
border-radius: 4px;
}
.LayoutSelector .TabButton.selected {background: var(--main-color)}
.LayoutSelector .TabButton.selected:hover {background: var(--main-color-hover)}
.LayoutSelector .TabButton.selected .icon16 {background: #FFF}
.LayoutSelector .TabButton:nth-of-type(1) .icon16 {--icon-url: var(--icon-layout-list)}
.LayoutSelector .TabButton:nth-of-type(2) .icon16 {--icon-url: var(--icon-layout-compact)}
.LayoutSelector .TabButton:nth-of-type(3) .icon16 {--icon-url: var(--icon-layout-cover)}
/* LAYOUT */
#Content[layout="compact-list"] .PrinterArea {
grid-template-columns: repeat(4, 1fr);
}
#Content[layout="compact-list"] .PImg {
display: none;
}
#Content[layout="compact-list"] .OneVendorBlock {
margin-bottom: 15px;
}
#Content[layout="compact-cover"] .PrinterArea {
grid-template-columns: repeat(3, 1fr);
}
#Content[layout="compact-cover"] .PImg {
width: 60px;
min-width: 60px;
height: 60px;
}
#Content[layout|="compact"] .PName {
text-align: left;
}
#Content[layout|="compact"] .PrinterBlock {
flex-direction: row;
padding: 5px 5px 5px 18px;
}
#Content[layout|="compact"] .ModelCheckBox {
width: 6px;
height: 80%;
left:0;
top:10%
}
#Content[layout|="compact"] .OneVendorBlock:last-of-type {
margin-bottom: 0px;
}
/*-----Notice-----*/
#NoticeMask
{
background-color: #000;
position: absolute;
top: 0px;
left: 0px;
right: 0px;
bottom: 0px;
opacity: 0.05;
display: none;
}
#NoticeBody
{
display: none;
width: 400px;
border-width: 1px;
border-style: solid;
border-radius: 4px;
background-color: inherit;
position: absolute;
left: 50%;
top: 200px;
margin-left: -200px;
}
#NoticeBar
{
background-color:#00f0d8;
height: 40px;
line-height: 40px;
color: #fff;
text-align: center;
}
#NoticeContent
{
padding: 4mm 10mm;
}
#NoticeBtns
{
margin-top: 4mm;
display: flex;
justify-content:flex-end;
}
.search {
position: absolute;
left:66px;
top: 14px;
width: 34px;
height: 34px;
z-index: 99;
overflow: hidden;
}
.search:focus-within,
.search[hasvalue="1"] {
width: calc(100% - 194px);
}
.searchTerm {
width: 100%;
height: 100%;
padding: 4px 5px;
border-radius: 6px;
outline: none;
box-sizing: border-box;
background: var(--button-bg-normal);
border: 1px solid var(--button-bg-normal);
}
@media (prefers-reduced-motion: no-preference) {
.searchTerm {
transition: background-color .2s
}
}
.searchTerm,
.search-placeholder {
line-height: 24px; /* ORCA center text vertically */
font-size: 14px;
}
.search:focus-within .searchTerm,
.search[hasvalue="1"] .searchTerm {
padding-left:33px;
background: var(--bg-color);
border-color: var(--main-color);
}
.search[hasvalue="1"]:not(:focus-within, :hover) .searchTerm {
border-color: var(--border-color);
}
.search:not(:focus-within, [hasvalue="1"]) .searchTerm {
cursor: default;
}
.search:not(:focus-within, [hasvalue="1"]) .searchTerm:hover {
background: var(--button-bg-hover);
}
.search-placeholder {
color: var(--fg-color-disabled);
left: 33px;
}
.searchTerm:not(:placeholder-shown) + .search-placeholder {
opacity: 0;
}
.search-icon,
.search-placeholder {
position: absolute;
top: 50%;
transform: translateY(-50%);
pointer-events: none;
}
.search-icon {
left: 9px;
--icon-url: var(--icon-search);
}
.SidebarBtn {
position: absolute;
left: 20px;
top: 14px;
padding: 9px;
border-radius: 6px;
}
.SidebarBtn .icon16 {
--icon-url: var(--icon-sidebar);
}
#SidebarContainer {
position: absolute;
top: 0;
left: -240px;
right: 0;
height: 100%;
z-index: 999999;
display: flex;
pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
#SidebarContainer {
transition: background-color .2s, left .2s
}
}
#SidebarContainer[open="1"] {
left: 0px;
pointer-events: all;
background: rgba(0,0,0,.3);
}
#Sidebar {
flex: 0 0 220px;
background: var(--bg-color);
box-shadow: 5px 0 20px rgba(0,0,0,.2);
padding: 15px 0;
overflow-y: auto;
}
#Sidebar .title {
font-size: 17px;
line-height: 17px;
font-weight: 600;
padding: 0 0 5px 20px;
}
#Sidebar .SidebarItem {
width: 100%;
padding: 2px 10px 2px 20px;
color:var(--fg-color-text);
font-size: 14px;
border: 1px solid transparent;
box-sizing: border-box;
}
#Sidebar .SidebarItem:hover {
border-color: var(--main-color);
}
#SidebarContainer .back {
flex: 1;
}