| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858 |
- @function gtkalpha($c,$a) {
- @return unquote("alpha(#{$c},#{$a})");
- }
- $ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
- $asset_suffix: if($variant=='dark', '-dark', '');
- $backdrop_transition: 200ms ease-out;
- $button_transition: all 200ms $ease-out-quad;
- $button_radius: 5px;
- $menu_radius: 5px;
- $window_radius: $button_radius + 3;
- $popover_radius: $button_radius + 4;
- // Optional compact sizes for buttons, headerbar and headerbar widgets
- $_sizevariant: 'default'; //compact otherwise
- $_headerbar_height: if($_sizevariant=='default', 46px, 40px);
- $_entry_height: if($_sizevariant=='default', 32px, 28px);
- $_btn_pad: if($_sizevariant=='default', 4px 9px, 2px 6px);
- $_hb_btn_pad: if($_sizevariant=='default', 6px, 5px);
- $_img_btn_pad: if($_sizevariant=='default', 5px, 2px);
- $_sel_menu_pad: if($_sizevariant=='default', 6px 10px, 4px 10px);
- $_circ_btn_pad: if($_sizevariant=='default', 4px, 2px);
- $_switch_margin: if($_sizevariant=='default', 10px, 7px);
- * {
- padding: 0;
- -GtkToolButton-icon-spacing: 4;
- -GtkTextView-error-underline-color: $error_color;
- // The size for scrollbars. The slider is 2px smaller, but we keep it
- // up so that the whole area is sensitive to button presses for the
- // slider. The stepper button is larger in both directions, the slider
- // only in the width
- -GtkScrolledWindow-scrollbar-spacing: 0;
- -GtkToolItemGroup-expander-size: 11;
- -GtkWidget-text-handle-width: 20;
- -GtkWidget-text-handle-height: 24;
- -GtkDialog-button-spacing: 4;
- -GtkDialog-action-area-border: 0;
- // We use the outline properties to signal the focus properties
- // to the adwaita engine: using real CSS properties is faster,
- // and we don't use any outlines for now.
- outline-color: gtkalpha(currentColor, 0.3);
- outline-style: dashed;
- outline-offset: -3px;
- outline-width: 1px;
- -gtk-outline-radius: $button-radius - 2;
- -gtk-secondary-caret-color: $selected_bg_color
- }
- /***************
- * Base States *
- ***************/
- .background {
- color: $fg_color;
- background-color: $bg_color;
- &:backdrop {
- color: $backdrop_fg_color;
- background-color: $backdrop_bg_color;
- text-shadow: none;
- -gtk-icon-shadow: none;
- }
- }
- /*
- These wildcard seems unavoidable, need to investigate.
- Wildcards are bad and troublesome, use them with care,
- or better, just don't.
- Everytime a wildcard is used a kitten dies, painfully.
- */
- *:disabled { -gtk-icon-effect: dim; }
- .gtkstyle-fallback {
- color: $fg_color;
- background-color: $bg_color;
- &:hover {
- color: $fg_color;
- background-color: lighten($bg_color, 10%);
- }
- &:active {
- color: $fg_color;
- background-color: darken($bg_color, 10%);
- }
- &:disabled {
- color: $insensitive_fg_color;
- background-color: $insensitive_bg_color;
- }
- &:selected {
- color: $selected_fg_color;
- background-color: $selected_bg_color;
- }
- }
- .view,
- %view {
- color: $text_color;
- caret-color: $caret_color;
- background-color: $base_color;
- &:backdrop {
- color: $backdrop_text_color;
- background-color: $backdrop_base_color;
- &:disabled { color: $backdrop_insensitive_color; }
- }
- &:disabled {
- color: $insensitive_fg_color;
- background-color: $insensitive_bg_color;
- }
- &:selected {
- &:focus, & {
- @extend %selected_items;
- border-radius: 3px;
- }
- }
- }
- .view,
- textview {
- text {
- @extend %view;
- selection { &:focus, & { @extend %selected_items; }}
- }
- }
- textview border { background-color: mix($bg_color, $base_color, 50%); }
- iconview { @extend .view; }
- .rubberband,
- rubberband {
- border: 1px solid darken($selected_bg_color, 10%);
- background-color: transparentize(darken($selected_bg_color, 10%), 0.8);
- }
- flowbox {
- rubberband { @extend rubberband; }
- flowboxchild {
- padding: 3px;
- &:selected {
- @extend %selected_items;
- outline-offset: -2px;
- }
- }
- }
- .content-view .tile {
- margin: 2px;
- background-color: if($variant=='light', transparent, black);
- border-radius: 0;
- padding: 0;
-
- &:backdrop { background-color: if($variant=='light', transparent, darken($backdrop_base_color,5%)); }
- &:active, &:selected { background-color: if($variant=='light', transparent, $selected_bg_color); }
- &:disabled { background-color: if($variant=='light', transparent, $insensitive_bg_color); }
- }
- label {
- caret-color: currentColor; // this shouldn't be needed.
- &.separator {
- @extend .dim-label;
- }
- &:selected { @extend %nobg_selected_items; }
- selection {
- background-color: $selected_bg_color;
- color: $selected_fg_color;
- }
- &:disabled {
- color: $insensitive_fg_color;
- button & { color: inherit; }
- &:backdrop {
- color: $backdrop_insensitive_color;
- button & { color: inherit; }
- }
- selection { @extend %selected_items_disabled; }
- }
- &:backdrop {
- selection { @extend %selected_items_backdrop; }
- }
- &.error {
- color: $error_color;
- &:disabled { color: transparentize($error_color,0.5); }
- &:disabled:backdrop { color: transparentize($error_color,0.6); }
- }
- }
- .dim-label {
- opacity: 0.55;
- text-shadow: none;
- }
- assistant {
- .sidebar {
- background-color: $base_color;
- border-top: 1px solid $borders_color;
- &:backdrop {
- background-color: $backdrop_base_color;
- border-color: $backdrop_borders_color;
- }
- }
- &.csd .sidebar { border-top-style: none; }
- .sidebar label { padding: 6px 12px; }
- .sidebar label.highlight { background-color: mix($bg_color, $fg_color, 80%); }
- }
- %osd,
- .osd {
- color: $osd_fg_color;
- border: none;
- background-color: $osd_bg_color;
- background-clip: padding-box;
- text-shadow: 0 1px black;
- -gtk-icon-shadow: 0 1px black;
- &:backdrop {
- text-shadow: none;
- -gtk-icon-shadow: none;
- }
- }
- /*********************
- * Spinner Animation *
- *********************/
- @keyframes spin {
- to { -gtk-icon-transform: rotate(1turn); }
- }
- spinner {
- background: none;
- &:backdrop { color: $backdrop_fg_color; }
- opacity: 0; // non spinning spinner makes no sense
- -gtk-icon-source: -gtk-icontheme('process-working-symbolic');
- &:checked {
- opacity: 1;
- animation: spin 1s linear infinite;
- &:disabled { opacity: 0.5; }
- }
- }
- /**********************
- * General Typography *
- **********************/
- .large-title {
- font-weight: 300;
- font-size: 24pt;
- }
- .title-1 {
- font-weight: 800;
- font-size: 20pt;
- }
- .title-2 {
- font-weight: 800;
- font-size: 15pt;
- }
- .title-3 {
- font-weight: 700;
- font-size: 15pt;
- }
- .title-4 {
- font-weight: 700;
- font-size: 13pt;
- }
- .heading {
- font-weight: 700;
- font-size: 11pt;
- }
- .body {
- font-weight: 400;
- font-size: 11pt;
- }
- .caption-heading {
- font-weight: 700;
- font-size: 9pt;
- }
- .caption {
- font-weight: 400;
- font-size: 9pt;
- }
- /****************
- * Text Entries *
- ****************/
- %entry,
- entry {
- %entry_basic, & {
- min-height: $_entry_height;
- padding-left: 8px;
- padding-right: 8px;
- border: 1px solid;
- border-radius: $button_radius;
- transition: all 200ms $ease-out-quad;
- @include entry(normal);
- image { // icons inside the entry
- &.left { margin-right: 6px; }
- &.right { margin-left: 6px; }
- }
- &.flat {
- &:focus, &:backdrop, &:disabled, &:backdrop:disabled, & {
- min-height: 0;
- padding: 2px;
- background-color: transparent;
- border-color: transparent;
- border-radius: 0;
- }
- }
- &:focus { @include entry(focus); }
- &:disabled { @include entry(insensitive); }
- &:backdrop {
- @include entry(backdrop);
- transition: $backdrop_transition;
- }
- &:backdrop:disabled { @include entry(backdrop-insensitive); }
- selection { @extend %selected_items; }
- // entry error and warning style
- @each $e_type, $e_color in (error, $error_color),
- (warning, $warning_color) {
- &.#{$e_type} {
- color: $e_color;
- border-color: entry_focus_border($e_color);
- &:focus { @include entry(focus, $e_color); }
- selection { background-color: $e_color; }
- }
- }
- image { // entry icons colors
- color: mix($fg_color, $base_color, 80%);
- &:hover { color: $fg_color; }
- &:active { color: $selected_bg_color; }
- &:backdrop { color: mix($backdrop_fg_color, $backdrop_base_color, 80%); }
- }
- &:drop(active) {
- &:focus, & {
- border-color: $drop_target_color;
- box-shadow: inset 0 0 0 1px $drop_target_color;
- }
- }
- .osd & {
- @include entry(osd);
- &:focus { @include entry(osd-focus); }
- &:backdrop { @include entry(osd-backdrop); }
- &:disabled { @include entry(osd-insensitive); }
- }
- }
- progress {
- margin: 2px -6px;
- background-color: transparent;
- background-image: none;
- border-radius: 0;
- border-width: 0 0 2px;
- border-color: $progress_bg_color;
- border-style: solid;
- box-shadow: none;
- &:backdrop { background-color: transparent; }
- }
- // linked entries
- .linked:not(.vertical) > & { @extend %linked; }
- .linked:not(.vertical) > &:focus + &,
- .linked:not(.vertical) > &:focus + button,
- .linked:not(.vertical) > &:focus + combobox > box > button.combo { border-left-color: entry_focus_border(); }
- .linked:not(.vertical) > &:focus.error + &,
- .linked:not(.vertical) > &:focus.error + button,
- .linked:not(.vertical) > &:focus.error + combobox > box > button.combo { border-left-color: entry_focus_border($error_color); }
- .linked:not(.vertical) > &:drop(active) + &,
- .linked:not(.vertical) > &:drop(active) + button,
- .linked:not(.vertical) > &:drop(active) + combobox > box > button.combo { border-left-color: $drop_target_color; }
- // Vertically linked entries
- // FIXME: take care of "colored" entries
- .linked.vertical > & {
- @extend %linked_vertical;
- // brighter border between linked entries
- &:not(:disabled) + entry:not(:disabled),
- &:not(:disabled) + %entry:not(:disabled) {
- border-top-color: mix($borders_color, $base_color, 30%);
- &:backdrop { border-top-color: mix($backdrop_borders_color, $backdrop_base_color, 30%); }
- }
- // brighter border between linked insensitive entries
- &:disabled + %entry:disabled,
- &:disabled + entry:disabled { border-top-color: mix($borders_color, $base_color, 30%); }
- // color back the top border of a linked focused entry following another entry.
- // :not(:only-child) is a specificity bump hack.
- + %entry:focus:not(:only-child),
- + entry:focus:not(:only-child) { border-top-color: entry_focus_border(); }
- + %entry:focus.error:not(:only-child),
- + entry:focus.error:not(:only-child) { border-top-color: entry_focus_border($error_color); }
- + %entry:drop(active):not(:only-child),
- + entry:drop(active):not(:only-child) { border-top-color: $drop_target_color; }
- // this takes care of coloring the top border of the focused entry subsequent widget.
- // :not(:only-child) is a specificity bump hack.
- &:focus:not(:only-child) {
- + %entry,
- + entry,
- + button,
- + combobox > box > button.combo { border-top-color: entry_focus_border(); }
- }
- &:focus.error:not(:only-child) {
- + %entry,
- + entry,
- + button,
- + combobox > box > button.combo { border-top-color: entry_focus_border($error_color); }
- }
- &:drop(active):not(:only-child) {
- + %entry,
- + entry,
- + button,
- + combobox > box > button.combo { border-top-color: $drop_target_color; }
- }
- }
- &.error { color: $error_color; }
- }
- treeview entry {
- &:focus {
- &:dir(rtl), &:dir(ltr) { // specificity bump hack
- background-color: $base_color;
- transition-property: color, background;
- }
- }
- &.flat, & {
- border-radius: 0;
- background-image: none;
- background-color: $base_color;
- &:focus { border-color: $selected_bg_color; }
- }
- }
- .entry-tag {
- // sizing
- padding: 5px;
- margin-top: 2px;
- margin-bottom: 2px;
- // side margins: compensate the entry padding with a negative margin
- // then the negative margin itself
- :dir(ltr) & {
- margin-left: 8px;
- margin-right: -5px;
- }
- :dir(rtl) & {
- margin-left: -5px;
- margin-right: 8px;
- }
- border-style: none;
- $_entry_tag_color: if($variant=='light', $selected_fg_color, $base_color);
- color: $_entry_tag_color;
- $_entry_tag_bg: if($variant=='light', $selected_bg_color, mix($fg_color, $base_color, 50%));
- background-color: $_entry_tag_bg;
- &:hover {
- background-color: lighten($_entry_tag_bg, 10%);
- }
- :backdrop & {
- color: $backdrop_base_color;
- background-color: if($variant=='light', $selected_bg_color,
- mix($backdrop_fg_color, $backdrop_base_color, 50%));
- }
- &.button {
- background-color: transparent;
- color: transparentize($_entry_tag_color, 0.3);
- }
- :not(:backdrop) &.button {
- &:hover {
- border: 1px solid $_entry_tag_bg;
- color: $_entry_tag_color;
- }
- &:active {
- background-color: $_entry_tag_bg;
- color: transparentize($_entry_tag_color, 0.3);
- }
- }
- }
- /***********
- * Buttons *
- ***********/
- // stuff for .needs-attention
- $_dot_color: if($variant=='light', $selected_bg_color,
- lighten($selected_bg_color,15%));
- @keyframes needs_attention {
- from {
- background-image: -gtk-gradient(radial,
- center center, 0,
- center center, 0.01,
- to($_dot_color),
- to(transparent));
- }
- to {
- background-image: -gtk-gradient(radial,
- center center, 0,
- center center, 0.5,
- to($selected_bg_color),
- to(transparent));
- }
- }
- %button,
- button {
- @at-root %button_basic, & {
- min-height: 24px;
- min-width: 16px;
- padding: $_btn_pad;
- border: 1px solid;
- border-radius: $button_radius;
- transition: $button_transition;
- @include button(normal);
- @at-root %button_basic_flat,
- &.flat {
- @include button(undecorated);
- // to avoid adiacent buttons borders clashing when transitioning, the transition on the normal state is set
- // to none, while it's added back in the hover state, so the button decoration will fade in on hover, but
- // it won't fade out when the pointer leave the button allocation area. To make the transition more evident
- // in this case the duration is increased.
- transition: none;
- &:hover {
- transition: $button_transition;
- transition-duration: 500ms;
- &:active { transition: $button_transition; }
- }
- }
- &:hover {
- @include button(hover);
- -gtk-icon-effect: highlight;
- }
- &:active,
- &:checked {
- @include button(active);
- transition-duration: 50ms;
- }
- &:backdrop {
- &.flat, & {
- @include button(backdrop);
- transition: $backdrop_transition;
- -gtk-icon-effect: none;
- &:active,
- &:checked { @include button(backdrop-active); }
- &:disabled {
- @include button(backdrop-insensitive);
- &:active,
- &:checked { @include button(backdrop-insensitive-active); }
- }
- }
- }
- @at-root %button_basic_flat,
- &.flat { &:backdrop, &:disabled, &:backdrop:disabled { @include button(undecorated); }}
- &:disabled {
- @include button(insensitive);
- &:active,
- &:checked { @include button(insensitive-active); }
- }
- &.image-button {
- min-width: 24px;
- padding-left: $_img_btn_pad;
- padding-right: $_img_btn_pad;
- }
- &.text-button {
- padding-left: 16px;
- padding-right: 16px;
- }
- &.text-button.image-button {
- padding-left: 8px;
- padding-right: 8px;
- label {
- padding-left: 8px;
- padding-right: 8px;
- }
- }
- @at-root %button_basic_drop_active,
- &:drop(active) {
- color: $drop_target_color;
- border-color: $drop_target_color;
- box-shadow: inset 0 0 0 1px $drop_target_color;
- }
- }
- @at-root %button_selected, & {
- row:selected & {
- @if $variant == 'light' { border-color: $selected_borders_color; }
- }
- @at-root %button_selected_flat, &.flat {
- row:selected & {
- &:not(:active):not(:checked):not(:hover):not(disabled) {
- color: $selected_fg_color;
- border-color: transparent;
- &:backdrop { color: if($variant=='light', $backdrop_base_color, $backdrop_fg_color); }
- }
- }
- }
- }
- // big standalone buttons like in Documents pager
- &.osd {
- min-width: 26px;
- min-height: 32px;
- &.image-button { min-width: 34px; }
- color: $osd_fg_color;
- border-radius: 5px;
- @include button(osd);
- border: none;
- box-shadow: none;
- &:hover {
- @include button(osd-hover);
- border: none;
- box-shadow: none;
- }
- &:active,
- &:checked {
- @include button(osd-active);
- border: none;
- box-shadow: none;
- }
- &:disabled {
- &:backdrop, & {
- @include button(osd-insensitive);
- border: none;
- }
- }
- &:backdrop {
- @include button(osd-backdrop);
- border: none;
- }
- }
- //overlay / OSD style
- @at-root %osd_button,
- .osd & {
- @include button(osd);
- &:hover { @include button(osd-hover); }
- &:active,
- &:checked { &:backdrop, & { @include button(osd-active); }}
- &:disabled { &:backdrop, & { @include button(osd-insensitive); }}
- &:backdrop { @include button(osd-backdrop); }
- &.flat {
- @include button(undecorated);
- box-shadow: none; //FIXME respect no edge on the button mixin
- text-shadow: 0 1px black;
- -gtk-icon-shadow: 0 1px black;
- &:hover { @include button(osd-hover); }
- &:disabled {
- @include button(osd-insensitive);
- background-image: none;
- border-color: transparent;
- box-shadow: none;
- }
- &:backdrop { @include button(undecorated); }
- &:active,
- &:checked { @include button(osd-active); }
- }
- }
- // Suggested and Destructive Action buttons
- @each $b_type, $b_color in (suggested-action, $suggested_bg_color),
- (destructive-action, $destructive_color) {
- &.#{$b_type} {
- @include button(normal, $b_color, white);
- &.flat {
- @include button(undecorated);
- color: $b_color; //FIXME: does it work on the dark variant?
- }
- &:hover { @include button(hover, $b_color, white); }
- &:active,
- &:checked { @include button(active, $b_color, white); }
- &:backdrop,
- &.flat:backdrop {
- @include button(backdrop, $b_color, white);
- &:active,
- &:checked { @include button(backdrop-active, $b_color, white); }
- &:disabled {
- @include button(backdrop-insensitive);
- &:active,
- &:checked { @include button(backdrop-insensitive-active, $b_color, white); }
- }
- }
- &.flat {
- &:backdrop, &:disabled, &:backdrop:disabled {
- @include button(undecorated);
- color: transparentize($b_color, 0.2);
- }
- }
- &:disabled {
- @include button(insensitive);
- &:active,
- &:checked { @include button(insensitive-active, $b_color, white); }
- }
- .osd & {
- @include button(osd, $b_color);
- &:hover { @include button(osd-hover, $b_color); }
- &:active,
- &:checked { &:backdrop, & { @include button(osd-active, $b_color); }}
- &:disabled { &:backdrop, & { @include button(osd-insensitive, $b_color); }}
- &:backdrop { @include button(osd-backdrop, $b_color); }
- }
- }
- }
- .stack-switcher > & {
- // to position the needs attention dot, padding is added to the button
- // child, a label needs just lateral padding while an icon needs vertical
- // padding added too.
- outline-offset: -3px; // needs to be set or it gets overriden by GtkRadioButton outline-offset
- > label {
- padding-left: 6px; // label padding
- padding-right: 6px; //
- }
- > image {
- padding-left: 6px; // image padding
- padding-right: 6px; //
- padding-top: 3px; //
- padding-bottom: 3px; //
- }
- &.text-button {
- // compensate text-button paddings
- padding-left: 10px;
- padding-right: 10px;
- }
- &.image-button {
- // we want image buttons to have a 1:1 aspect ratio, so compensation
- // of the padding added to the GtkImage is needed
- padding-left: 2px;
- padding-right: 2px;
- }
- &.needs-attention {
- > label,
- > image { @extend %needs_attention; }
- &:active,
- &:checked {
- > label,
- > image {
- animation: none;
- background-image: none;
- }
- }
- }
- }
- // hide separators
- &.font,
- &.file { separator { background-color: transparent; }}
- &.font { > box > box > label { font-weight: bold; }}
- // inline-toolbar buttons
- .inline-toolbar & { @extend %linked; }
- .primary-toolbar & { -gtk-icon-shadow: none; } // tango icons don't need shadows
- .linked > & { @extend %linked; }
- .linked.vertical > & { @extend %linked_vertical; }
- &.circular { // The Bloody Circul Button
- border-radius: 9999px;
- -gtk-outline-radius: 9999px;
- padding: $_circ_btn_pad; /* circles instead of ellipses */
- label { padding: 0; }
- // the followind code is needed since we use a darker bottom border on buttons, which looks pretty
- // bad with a 100% border radius (see https://bugzilla.gnome.org/show_bug.cgi?id=771205 for details),
- // so on relevant states we an additional background-image with a gradient clipped on the border-box,
- // so setting a transparent border would reveal it.
- $_border_bg: linear-gradient(to top, $alt-borders-color 25%, $borders-color 50%);
- &:not(.flat):not(.osd):not(:checked):not(:active):not(:disabled):not(:backdrop) {
- @include button(normal, $backimage: $_border_bg);
- border-color: transparent;
- }
- &:hover:not(.osd):not(:checked):not(:active):not(:disabled):not(:backdrop) {
- @include button(hover, $backimage: $_border_bg);
- border-color: transparent;
- }
- background-origin: padding-box, border-box;
- background-clip: padding-box, border-box;
- }
- }
- %needs_attention {
- animation: needs_attention 150ms ease-in;
- $_dot_shadow: _text_shadow_color();
- $_dot_shadow_r: if($variant=='light',0.5,0.45);
- background-image: -gtk-gradient(radial,
- center center, 0,
- center center, 0.5,
- to($_dot_color),
- to(transparent)),
- -gtk-gradient(radial,
- center center, 0,
- center center, $_dot_shadow_r,
- to($_dot_shadow),
- to(transparent));
- background-size: 6px 6px, 6px 6px;
- background-repeat: no-repeat;
- @if $variant == 'light' { background-position: right 3px, right 4px; }
- @else { background-position: right 3px, right 2px; }
- &:backdrop { background-size: 6px 6px, 0 0;}
- &:dir(rtl) {
- @if $variant == 'light' { background-position: left 3px, left 4px; }
- @else { background-position: left 3px, left 2px; }
- }
- }
- // all the following is for the +|- buttons on inline toolbars, that way
- // should really be deprecated...
- .inline-toolbar toolbutton > button { // redefining the button look is
- // needed since those are flat...
- @include button(normal);
- &:hover { @include button(hover); }
- &:active,
- &:checked{ @include button(active); }
- &:disabled {
- @include button(insensitive);
- &:active,
- &:checked { @include button(insensitive-active); }
- }
- &:backdrop {
- @include button(backdrop);
- &:active,
- &:checked { @include button(backdrop-active); }
- &:disabled {
- @include button(backdrop-insensitive);
- &:active,
- &:checked { @include button(backdrop-insensitive-active); }
- }
- }
- }
- // More inline toolbar buttons
- toolbar.inline-toolbar toolbutton {
- > button.flat { @extend %linked_middle; }
- &:first-child > button.flat { @extend %linked_left; }
- &:last-child > button.flat { @extend %linked_right; }
- &:only-child > button.flat { @extend %linked_only_child; }
- }
- %linked_middle {
- border-right-style: none;
- border-radius: 0;
- -gtk-outline-radius: 0;
- }
- %linked_left {
- border-top-left-radius: $button_radius;
- border-bottom-left-radius: $button_radius;
- -gtk-outline-top-left-radius: $button_radius;
- -gtk-outline-bottom-left-radius: $button_radius;
- }
- %linked_right {
- border-right-style: solid;
- border-top-right-radius: $button_radius;
- border-bottom-right-radius: $button_radius;
- -gtk-outline-top-right-radius: $button_radius;
- -gtk-outline-bottom-right-radius: $button_radius;
- }
- %linked_only_child {
- border-style: solid;
- border-radius: $button_radius;
- -gtk-outline-radius: $button_radius;
- }
- // .linked assumes Box, which reverses nodes in RTL, so 1st child is always left
- %linked {
- @extend %linked_middle;
- &:first-child { @extend %linked_left; }
- &:last-child { @extend %linked_right; }
- &:only-child { @extend %linked_only_child; }
- }
- // Other widgets use widget child order, so 1st/last child are at text start/end
- %linked_flippable {
- @extend %linked_middle;
- &:dir(ltr) {
- &:first-child { @extend %linked_left; }
- &:last-child { @extend %linked_right; }
- }
- &:dir(rtl) {
- &:first-child { @extend %linked_right; }
- &:last-child { @extend %linked_left; }
- }
- &:only-child { @extend %linked_only_child; }
- }
- %linked_vertical_middle {
- border-style: solid solid none solid;
- border-radius: 0;
- -gtk-outline-radius: 0;
- }
- %linked_vertical_top {
- border-top-left-radius: $button_radius;
- border-top-right-radius: $button_radius;
- -gtk-outline-top-left-radius: $button_radius;
- -gtk-outline-top-right-radius: $button_radius;
- }
- %linked_vertical_bottom {
- border-bottom-style: solid;
- border-bottom-left-radius: $button_radius;
- border-bottom-right-radius: $button_radius;
- -gtk-outline-bottom-left-radius: $button_radius;
- -gtk-outline-bottom-right-radius: $button_radius;
- }
- %linked_vertical_only_child {
- border-style: solid;
- border-radius: $button_radius;
- -gtk-outline-radius: $button_radius;
- }
- %linked_vertical {
- @extend %linked_vertical_middle;
- &:first-child { @extend %linked_vertical_top; }
- &:last-child { @extend %linked_vertical_bottom; }
- &:only-child { @extend %linked_vertical_only_child; }
- }
- %undecorated_button {
- background-color: transparent;
- background-image: none;
- border-color: transparent;
- box-shadow: inset 0 1px transparentize(white, 1),
- 0 1px transparentize(white, 1);
- text-shadow: none;
- -gtk-icon-shadow: none;
- }
- /* menu buttons */
- modelbutton.flat,
- .menuitem.button.flat {
- min-height: 26px;
- padding-left: 5px;
- padding-right: 5px;
- border-radius: $button_radius;
- outline-offset: -2px;
- @extend %undecorated_button;
- &:hover { background-color: $popover_hover_color; }
- &:selected { @extend %selected_items; }
- &:backdrop,
- &:backdrop:hover { @extend %undecorated_button; }
- }
- modelbutton.flat arrow {
- background: none;
- &:hover { background: none; }
- &.left { -gtk-icon-source: -gtk-icontheme("pan-start-symbolic"); }
- &.right { -gtk-icon-source: -gtk-icontheme("pan-end-symbolic"); }
- }
- button.color {
- padding: 4px;
- colorswatch:only-child {
- &, overlay { border-radius: 0; }
- @if $variant == 'light' {
- box-shadow: 0 1px _text_shadow_color();
- .osd & { box-shadow: none; }
- }
- }
- @if $variant == 'light' {
- .osd &, & {
- &:disabled,
- &:backdrop,
- &:active,
- &:checked { colorswatch:only-child { box-shadow: none; }}
- }
- }
- }
- /* list buttons */
- /* tone down as per new designs, see issue #1473, #1748 */
- list row button.image-button:not(.flat) {
- @extend %undecorated_button;
- border: 1px solid transparentize($borders_color, .5);
- &:hover { @include button(hover); }
- &:active,
- &:checked { @include button(active); }
- }
- /*********
- * Links *
- *********/
- %link,
- *:link {
- color: $link_color;
- &:visited {
- color: $link_visited_color;
- *:selected & { color: mix($selected_fg_color, $link_visited_color, 60%); }
- }
- &:hover {
- $_fg: lighten($link_color, 10%);
- color: $_fg;
- *:selected & { color: mix($selected_fg_color, $_fg, 90%); }
- }
- &:active {
- color: $link_color;
- *:selected & { color: mix($selected_fg_color, $link_color, 80%); }
- }
- &:disabled, &:disabled:backdrop { color: transparentize(desaturate($link_color, 100%), 0.2); }
- &:backdrop { &:backdrop:hover, &:backdrop:hover:selected, & { color: transparentize($link_color, 0.1); }}
- @at-root %link_selected,
- &:selected,
- *:selected & { color: mix($selected_fg_color, $link_color, 80%); }
- }
- button:link,
- button:visited {
- @extend %undecorated_button;
- @extend %link;
- text-shadow: none;
- &:hover,
- &:active,
- &:checked {
- @extend %undecorated_button;
- text-shadow: none;
- }
- > label {
- @extend %link;
- text-decoration-line: underline;
- }
- }
- /*****************
- * GtkSpinButton *
- *****************/
- spinbutton {
- &:not(.vertical) {
- // in this horizontal configuration, the whole spinbutton
- // behaves as the entry, so we extend the entry styling
- // and nuke the style on the internal entry
- @extend %entry;
- padding: 0;
- %spinbutton_horz_entry {
- min-width: 28px;
- // reset all the other props since the spinbutton node is styled here
- margin: 0;
- background: none;
- background-color: transparent;
- border: none;
- border-radius: 0;
- box-shadow: none;
- &:backdrop:disabled { background-color: transparent; }
- }
- entry {
- @extend %spinbutton_horz_entry;
- }
- button {
- min-height: 16px;
- margin: 0;
- padding-bottom: 0;
- padding-top: 0;
- color: mix($fg_color, $base_color, 90%);
- background-image: none;
- border-style: none none none solid;
- border-color: transparentize($borders_color, 0.7);
- border-radius: 0;
- box-shadow: none;
- &:dir(rtl) { border-style: none solid none none; }
- &:hover {
- color: $fg_color;
- background-color: $base_hover_color;
- }
- &:disabled {
- color: transparentize($insensitive_fg_color, 0.7);
- background-color: transparent;
- }
- &:active {
- background-color: transparentize(black, 0.9);
- box-shadow: inset 0 2px 3px -1px transparentize(black, 0.8);
- }
- &:backdrop {
- color: mix($backdrop_fg_color, $backdrop_base_color, 90%);
- background-color: transparent;
- border-color: transparentize($backdrop_borders_color, 0.7);
- transition: $backdrop_transition;
- }
- &:backdrop:disabled {
- color: transparentize($backdrop_insensitive_color,0.7);
- background-color: transparent;
- background-image: none;
- border-style: none none none solid; // It is needed or it gets overridden
- &:dir(rtl) { border-style: none solid none none; }
- }
- &:dir(ltr):last-child { border-radius: 0 $button_radius $button_radius 0; }
- &:dir(rtl):first-child { border-radius: $button_radius 0 0 $button_radius; }
- }
- }
- // OSD horizontal
- .osd &:not(.vertical) {
- entry {
- @extend %spinbutton_horz_entry;
- }
- button {
- @include button(undecorated);
- color: $osd_fg_color;
- border-style: none none none solid;
- border-color: transparentize($osd_borders_color, 0.3);
- border-radius: 0;
- box-shadow: none;
- -gtk-icon-shadow: 0 1px black;
- &:dir(rtl) { border-style: none solid none none; }
- &:hover {
- @include button(undecorated);
- color: $osd_fg_color;
- border-color: transparentize(opacify($osd_borders_color, 1), 0.5);
- background-color: transparentize($osd_fg_color, 0.9);
- -gtk-icon-shadow: 0 1px black;
- box-shadow: none;
- }
- &:backdrop {
- @include button(undecorated);
- color: $osd_fg_color;
- border-color: transparentize(opacify($osd_borders_color, 1), 0.5);
- -gtk-icon-shadow: none;
- box-shadow: none;
- }
- &:disabled {
- @include button(undecorated);
- color: $osd_insensitive_fg_color;
- border-color: transparentize(opacify($osd_borders_color, 1), 0.5);
- -gtk-icon-shadow: none;
- box-shadow: none;
- }
- &:dir(ltr):last-child { border-radius: 0 $button_radius $button_radius 0; }
- &:dir(rtl):first-child { border-radius: $button_radius 0 0 $button_radius; }
- }
- }
- // Vertical
- &.vertical {
- // in the vertical configuration, we treat the spinbutton
- // as a box, and tweak the style of the entry in the middle
- // so that it's linked
- // FIXME: this should not be set at all, but otherwise it gets the wrong
- // color
- &:disabled { color: $insensitive_fg_color; }
- &:backdrop:disabled { color: $backdrop_insensitive_color; }
- &:drop(active) {
- border-color: transparent;
- box-shadow: none;
- }
- entry {
- min-height: 32px;
- min-width: 32px;
- padding: 0;
- border-radius: 0;
- }
- button {
- min-height: 32px;
- min-width: 32px;
- padding: 0;
- &.up { @extend %top_button; }
- &.down { @extend %bottom_button; }
- }
- %top_button {
- border-radius: $button_radius $button_radius 0 0;
- border-style: solid solid none solid;
- }
- %bottom_button {
- border-radius: 0 0 $button_radius $button_radius;
- border-style: none solid solid solid;
- }
- }
- // OSD vertical
- .osd &.vertical button:first-child {
- @include button(osd);
- &:hover { @include button(osd-hover);}
- &:active { @include button(osd-active); }
- &:disabled { @include button(osd-insensitive); }
- &:backdrop { @include button(osd-backdrop); }
- }
- // Misc
- treeview &:not(.vertical) {
- min-height: 0;
- border-style: none;
- border-radius: 0;
- entry {
- min-height: 0;
- padding: 1px 2px;
- }
- }
- font-feature-settings: "tnum";
- }
- /**************
- * ComboBoxes *
- **************/
- combobox {
- arrow {
- -gtk-icon-source: -gtk-icontheme('pan-down-symbolic');
- min-height: 16px;
- min-width: 16px;
- }
- &.linked {
- button:nth-child(2) {
- &:dir(ltr) { @extend %linked_right; }
- &:dir(rtl) { @extend %linked_left; }
- }
- }
- &:drop(active) { // FIXME: untested
- box-shadow: none;
- button.combo { @extend %button_basic_drop_active; }
- }
- }
- // the combo is a composite widget so the way we do button linking doesn't
- // work, special case needed. See
- // https://bugzilla.gnome.org/show_bug.cgi?id=733979
- .linked:not(.vertical) > combobox > box > button.combo { @extend %linked_middle; }
- .linked:not(.vertical) > combobox:first-child > box > button.combo { @extend %linked_left; }
- .linked:not(.vertical) > combobox:last-child > box > button.combo { @extend %linked_right; }
- .linked:not(.vertical) > combobox:only-child > box > button.combo { @extend %linked_only_child; }
- .linked.vertical > combobox > box > button.combo { @extend %linked_vertical_middle; }
- .linked.vertical > combobox:first-child > box > button.combo { @extend %linked_vertical_top; }
- .linked.vertical > combobox:last-child > box > button.combo { @extend %linked_vertical_bottom; }
- .linked.vertical > combobox:only-child > box > button.combo { @extend %linked_vertical_only_child; }
- /************
- * Toolbars *
- ************/
- %toolbar {
- -GtkWidget-window-dragging: true;
- padding: 4px;
- background-color: $bg_color;
- }
- toolbar {
- @extend %toolbar;
- padding: 4px 3px 3px 4px;
- // on OSD
- .osd & { background-color: transparent; }
- // stand-alone OSD toolbars
- &.osd {
- padding: 13px;
- border: none;
- border-radius: 5px;
- background-color: $osd_bg_color;
- &.left,
- &.right,
- &.top,
- &.bottom { border-radius: 0; } // positional classes for `attached` osd toolbars
- }
- // toolbar separators
- &.horizontal separator { margin: 0 7px 1px 6px; }
- &.vertical separator { margin: 6px 1px 7px 0; }
- &:not(.inline-toolbar):not(.osd) {
- // workaround: add margins to the children of tool items to simulate
- // spacing, ignore the overflow button (.toggle) and the overflow menu
- // (.popup)
- > *:not(.toggle):not(.popup) > * {
- margin-right: 1px;
- margin-bottom: 1px;
- }
- }
- }
- //searchbar, location-bar & inline-toolbar
- .inline-toolbar {
- @extend %toolbar;
- @extend %darkbar;
- padding: 3px;
- border-width: 0 1px 1px;
- border-radius: 0 0 5px 5px;
- }
- searchbar > revealer > box,
- .location-bar {
- @extend %toolbar;
- @extend %darkbar;
- border-width: 0 0 1px;
- padding: 3px;
- }
- searchbar > revealer > box {
- // workaround: undo the GtkContainer:border-width and use CSS padding instead
- margin: -6px;
- padding: 6px;
- }
- %darkbar {
- border-style: solid;
- border-color: $borders_color;
- $_bg: mix($bg_color, $borders_color, 70%);
- background-color: $_bg;
- &:backdrop {
- border-color: $backdrop_borders_color;
- background-color: $backdrop_dark_fill;
- box-shadow: none;
- transition: $backdrop_transition;
- }
- }
- /***************
- * Header bars *
- ***************/
- %titlebar,
- headerbar {
- padding: 0 6px;
- min-height: $_headerbar_height;
- border-width: 0 0 1px;
- border-style: solid;
- border-color: $alt_borders_color;
- border-radius: 0;
- @include headerbar_fill(darken($bg_color, 10%));
- &:backdrop {
- border-color: $backdrop_borders_color;
- background-color: $bg_color;
- background-image: none;
- box-shadow: inset 0 1px $top_hilight;
- transition: $backdrop_transition;
- }
- .title {
- padding-left: 12px;
- padding-right: 12px;
- font-weight: bold;
- }
- .subtitle {
- font-size: smaller;
- padding-left: 12px;
- padding-right: 12px;
- @extend .dim-label;
- }
- /* Darken switchbuttons for headerbars. issue #1588 */
- stackswitcher button:checked,
- button.toggle:checked {
- background: if($variant == 'light', image(darken($bg_color, 17%)), image(darken($bg_color, 9%)));
- border-color: darken($borders_color, 3%);
- border-top-color: darken($borders_color, 8%);
- &:backdrop {
- @include button(backdrop-active);
- }
- }
- .selection-mode &,
- &.selection-mode {
- $_hc: mix($top_hilight, $suggested_bg_color, 50%); // hilight color
- color: $selected_fg_color;
- border-color: $suggested_border_color;
- text-shadow: 0 -1px transparentize(black, 0.5);
- @include headerbar_fill($suggested_bg_color, $_hc);
- &:backdrop {
- background-color: $suggested_bg_color;
- background-image: none;
- box-shadow: inset 0 1px mix($top_hilight, $suggested_bg_color, 60%);
-
- label {
- text-shadow: none;
- color: $selected_fg_color;
- }
- }
- .subtitle:link { @extend %link_selected; }
- button {
- @include button(normal, $suggested_bg_color, $selected_fg_color);
- @at-root %selection_mode_button_flat,
- &.flat { @include button(undecorated); }
- &:hover { @include button(hover, $suggested_bg_color, $selected_fg_color); }
- &:active,
- &:checked,
- &.toggle:checked,
- &.toggle:active { @include button(active, $suggested_bg_color, $selected_fg_color); }
- &:backdrop {
- &.flat, & {
- @include button(backdrop, $suggested_bg_color, $selected_fg_color);
- -gtk-icon-effect: none;
- border-color: $suggested_border_color;
- &:active,
- &:checked {
- @include button(backdrop-active, $suggested_bg_color, $selected_fg_color);
- border-color: $suggested_border_color;
- }
- &:disabled {
- @include button(backdrop-insensitive, $suggested_bg_color, $selected_fg_color);
- border-color: $suggested_border_color;
- &:active, &:checked {
- @include button(backdrop-insensitive-active, $suggested_bg_color, $selected_fg_color);
- border-color: $suggested_border_color;
- }
- }
- }
- }
- @at-root %selection_mode_button_flat,
- &.flat { &:backdrop, &:disabled, &:backdrop:disabled { @include button(undecorated); }}
- &:disabled {
- @include button(insensitive, $suggested_bg_color, $selected_fg_color);
- &:active,
- &:checked { @include button(insensitive-active, $suggested_bg_color, $selected_fg_color); }
- }
- &.suggested-action {
- @include button(normal);
- border-color: $suggested_border_color;
- &:hover {
- @include button(hover);
- border-color: $suggested_border_color;
- }
- &:active {
- @include button(active);
- border-color: $suggested_border_color;
- }
- &:disabled {
- @include button(insensitive);
- border-color: $suggested_border_color;
- }
- &:backdrop {
- @include button(backdrop);
- border-color: $suggested_border_color;
- }
- &:backdrop:disabled {
- @include button(backdrop-insensitive);
- border-color: $suggested_border_color;
- }
- }
- }
- .selection-menu {
- &:backdrop, & {
- border-color: transparentize($suggested_bg_color, 1);
- background-color: transparentize($suggested_bg_color, 1);
- background-image: none;
- box-shadow: none;
- min-height: 20px;
- padding: $_sel_menu_pad;
- arrow { -GtkArrow-arrow-scaling: 1; }
- .arrow {
- -gtk-icon-source: -gtk-icontheme('pan-down-symbolic');
- color: transparentize($selected_fg_color,0.5);
- -gtk-icon-shadow: none;
- }
- }
- }
- }
- // squared corners when the window is maximized, tiled, or fullscreen
- .tiled &,
- .tiled-top &,
- .tiled-right &,
- .tiled-bottom &,
- .tiled-left &,
- .maximized &,
- .fullscreen & {
- &:backdrop, & {
- border-radius: 0;
- }
- }
- &.default-decoration {
- min-height: 28px;
- padding: 4px;
- button.titlebutton {
- min-height: 26px;
- min-width: 26px;
- margin: 0;
- padding: 0;
- }
- }
-
-
- separator.titlebutton { opacity: 0; } /* hide the close button separator */
- .solid-csd & {
- &:backdrop, & {
- &:dir(rtl), &:dir(ltr) { // specificity bump
- margin-left: -1px;
- margin-right: -1px;
- margin-top: -1px;
- border-radius: 0;
- box-shadow: none;
- }
- }
- }
- }
- headerbar {
- // add vertical margins to common widget on the headerbar to avoid them spanning the whole height
- entry,
- spinbutton,
- separator:not(.sidebar),
- button {
- margin-top: $_hb_btn_pad;
- margin-bottom: $_hb_btn_pad;
- }
- switch {
- margin-top: $_switch_margin;
- margin-bottom: $_switch_margin;
- }
- &.titlebar headerbar:not(.titlebar) {
- // Drop the background of non-titlebar nested headerbars. This is needed to
- // work around headerbar sliding animation issues without refactoring
- // Adwaita's support of titlebars and headerbars as it may break
- // applications.
- // See https://gitlab.gnome.org/GNOME/gtk/issues/1264 for more information.
- background: none;
- box-shadow: none;
- }
- }
- .background .titlebar {
- &:backdrop, & {
- border-top-left-radius: $window_radius;
- border-top-right-radius: $window_radius;
- }
- }
- .background.tiled .titlebar,
- .background.tiled-top .titlebar,
- .background.tiled-right .titlebar,
- .background.tiled-bottom .titlebar,
- .background.tiled-left .titlebar,
- .background.maximized .titlebar,
- .background.solid-csd .titlebar {
- &:backdrop, & {
- border-top-left-radius: 0;
- border-top-right-radius: 0;
- }
- }
- headerbar { // headerbar border rounding
- window separator:first-child + &,
- window &:first-child { &:backdrop, & { border-top-left-radius: 7px; }}
- window &:last-child { &:backdrop, & { border-top-right-radius: 7px; }}
- window stack & { // tackles the stacked headerbars case
- &:first-child, &:last-child {
- &:backdrop, & {
- border-top-left-radius: 7px;
- border-top-right-radius: 7px;
- }
- }
- }
- window.tiled &,
- window.tiled-top &,
- window.tiled-right &,
- window.tiled-bottom &,
- window.tiled-left &,
- window.maximized &,
- window.fullscreen &,
- window.solid-csd & {
- &, &:backdrop {
- &,
- &:first-child,
- &:last-child,
- &:only-child {
- border-top-left-radius: 0;
- border-top-right-radius: 0;
- }
- }
- }
- }
- .titlebar:not(headerbar) {
- window.csd > & {
- // in csd we assume every titlebar is a headerbar so reset anything, this is needed for split toolbars cases
- padding: 0;
- background-color: transparent;
- background-image: none;
- border-style: none;
- border-color: transparent;
- box-shadow: none;
- }
- separator { background-color: $borders_color; } // FIXME: use darker border?
- @extend %titlebar;
- }
- // Development versions of apps to use a differently styled headerbar
- window.devel {
- headerbar.titlebar:not(.selection-mode) {
- $c: darken($bg_color, 10%);
- $gradient: cross-fade(10% -gtk-icontheme("system-run-symbolic"), image(transparent)) 90% 0/256px 256px no-repeat,
- linear-gradient(to right, transparent 65%, transparentize($selected_bg_color, 0.8)),
- linear-gradient(to top, darken($c, 3%), $c 3px, lighten($c, 6%));
- @if $variant == 'dark' {
- $gradient: cross-fade(10% -gtk-icontheme("system-run-symbolic"), image(transparent)) 90% 0/256px 256px no-repeat,
- linear-gradient(to right, transparent 65%, transparentize($selected_bg_color, 0.9)),
- linear-gradient(to top, lighten($c, 3%) 3px, lighten($c, 5%));
- }
- background: $bg_color $gradient;
- &:backdrop {
- background: $bg_color cross-fade(10% -gtk-icontheme("system-run-symbolic"), image(transparent)) 90% 0/256px 256px no-repeat,
- image($bg_color); /* background-color would flash */
- }
- }
- }
- /************
- * Pathbars *
- ************/
- // GtkPathBar does not work with just .linked, so we must override that. But we
- // can’t simply remove .linked from the widget as that might break other themes.
- // Note also we select on filechooser to avoid interfering with NautilusPathBar.
- filechooser .path-bar.linked > button {
- @extend %linked_flippable;
- }
- .path-bar button {
- &.text-button, &.image-button, & {
- padding-left: 4px;
- padding-right: 4px;
- }
- &.text-button.image-button label {
- padding-left: 0;
- padding-right: 0;
- }
- &.text-button.image-button, & {
- label:last-child { padding-right: 8px; }
- label:first-child { padding-left: 8px; }
- }
- image {
- padding-left: 4px;
- padding-right: 4px;
- }
- &.slider-button {
- padding-left: 0;
- padding-right: 0;
- }
- }
- /**************
- * Tree Views *
- **************/
- $_treeview_borders_color: if($variant=='light',mix($borders_color, $base_color,80%),mix($fg_color, $base_color, 20%));
- treeview.view {
- @at-root * {
- -GtkTreeView-horizontal-separator: 4;
- -GtkTreeView-grid-line-width: 1;
- -GtkTreeView-grid-line-pattern: '';
- -GtkTreeView-tree-line-width: 1;
- -GtkTreeView-tree-line-pattern: '';
- -GtkTreeView-expander-size: 16;
- }
- border-left-color: mix($fg_color, $base_color, 50%); // this is actually the tree lines color,
- border-top-color: $bg_color; // while this is the grid lines color, better then nothing
- rubberband { @extend rubberband; } // to avoid borders being overridden by the previously set props
- &:selected {
- &:focus, & {
- border-radius: 0;
- @extend %selected_items;
- }
- &:backdrop, & {
- border-left-color: mix($selected_fg_color, $selected_bg_color, 50%);
- border-top-color: transparentize($fg_color, 0.9); // doesn't work unfortunatelly
- }
- }
- &:disabled {
- color: $insensitive_fg_color;
- &:selected {
- color: mix($selected_fg_color, $selected_bg_color, 40%);
- &:backdrop { color: mix($backdrop_selected_fg_color, $selected_bg_color, 30%); }
- }
- &:backdrop { color: $backdrop_insensitive_color; }
- }
- &.separator {
- min-height: 2px;
- color: $bg_color;
- &:backdrop { color: transparentize($bg_color, 0.9); }
- }
- &:backdrop {
- border-left-color: mix($backdrop_fg_color, $backdrop_bg_color, 50%);
- border-top: $backdrop_bg_color;
- }
- &:drop(active) {
- border-style: solid none;
- border-width: 1px;
- border-color: $selected_borders_color;
- &.after { border-top-style: none; }
- &.before { border-bottom-style: none; }
- }
- &.expander {
- -gtk-icon-source: -gtk-icontheme('pan-end-symbolic');
- &:dir(rtl) { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic-rtl'); }
- color: mix($text_color, $base_color, 70%);
- &:hover { color: $text_color; }
- &:selected {
- color: mix($selected_fg_color, $selected_bg_color, 70%);
- &:hover { color: $selected_fg_color; }
- &:backdrop { color: mix($backdrop_selected_fg_color, $selected_bg_color, 70%); }
- }
- &:checked { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); }
- &:backdrop { color: mix($backdrop_fg_color, $backdrop_base_color, 70%); }
- }
- &.progressbar { // progress bar in treeviews
- @if $variant == light { color: $base_color; }
- background-color: $progress_bg_color;
- background-image: image($progress_bg_color);
- box-shadow: none;
- &:selected {
- &:focus, & {
- @if $variant == 'light' {
- color: $selected_bg_color;
- }
- @else { box-shadow: inset 0 1px transparentize(white, 0.95); }
- background-image: image($base_color);
- &:backdrop {
- @if $variant == 'light' {
- color: $selected_bg_color;
- }
- background-color: $backdrop_base_color;
- }
- }
- }
- &:backdrop {
- @if $variant == 'light' { color: $backdrop_base_color; }
- @else { border-color: $backdrop_base_color; }
- background-image: none;
- box-shadow: none;
- }
- }
- &.trough { // progress bar trough in treeviews
- background-color: transparentize($fg_color,0.9);
- &:selected {
- &:focus, & {
- background-color: if($variant == 'light',
- transparentize($selected_fg_color, 0.7),
- darken($selected_bg_color, 10%));
- }
- }
- }
- header {
- button {
- $_column_header_color: mix($fg_color, $base_color, 50%);
- @extend %column_header_button;
- color: $_column_header_color;
- background-color: $base_color;
- font-weight: bold;
- text-shadow: none;
- box-shadow: none;
- &:hover {
- @extend %column_header_button;
- color: mix($_column_header_color, $fg_color, 50%);
- box-shadow: none;
- transition: none; //I shouldn't need this
- }
- &:active {
- @extend %column_header_button;
- color: $fg_color;
- transition: none; //I shouldn't need this
- }
- }
- }
- button.dnd,
- header.button.dnd { // for treeview-like derive widgets
- &:active, &:selected, &:hover, & {
- padding: 0 6px;
- color: $base_color;
- background-image: none;
- background-color: $selected_bg_color;
- border-style: none;
- border-radius: 0;
- box-shadow: inset 0 0 0 1px $base_color;
- text-shadow: none;
- transition: none;
- }
- }
- acceleditor > label { background-color: $selected_bg_color; } // see tests/testaccel to test
- }
- %column_header_button {
- padding: 0 6px;
- background-image: none;
- border-style: none solid solid none;
- border-color: $_treeview_borders_color;
- border-radius: 0;
- text-shadow: none;
- &:disabled {
- border-color: $bg_color;
- background-image: none;
- }
- &:backdrop {
- color: mix($backdrop_fg_color, $backdrop_bg_color, 50%);
- border-color: $backdrop_bg_color;
- border-style: none solid solid none;
- background-image: none;
- background-color: $backdrop_base_color;
- &:disabled {
- border-color: $backdrop_bg_color;
- background-image: none;
- }
- }
- &:last-child { &:backdrop, & { border-right-style: none; }}
- }
- /*********
- * Menus *
- *********/
- menubar,
- .menubar {
- -GtkWidget-window-dragging: true;
- padding: 0px;
- box-shadow: inset 0 -1px transparentize(black, 0.9);
- &:backdrop { background-color: $backdrop_bg_color; }
- > menuitem {
- min-height: 16px;
- padding: 4px 8px;
- // remove padding and rounding from menubar submenus
- menu {
- &:dir(rtl), &:dir(ltr) { // specificity bump
- border-radius: 0;
- padding: 0;
- }
- }
- &:hover { //Seems like it :hover even with keyboard focus
- box-shadow: inset 0 -3px $selected_bg_color;
- color: $link_color;
- }
- &:disabled {
- color: $insensitive_fg_color;
- box-shadow: none;
- }
- }
- // remove padding and rounding from menubar submenu decoration
- .csd.popup decoration {border-radius:0;}
- }
- // Needed to make the border-radius of menus work
- // otherwise the background bleeds out of the menu edges
- .background.popup { background-color: transparent; }
- menu,
- .menu,
- .context-menu {
- margin: 4px; // see https://bugzilla.gnome.org/show_bug.cgi?id=591258
- padding: 4px 0px;
- background-color: $menu_color;
- border: 1px solid $borders_color; // adds borders in a non composited env
- .csd & {
- border: none; // axes borders in a composited env
- border-radius: $menu_radius;
- }
- &:backdrop { background-color: $backdrop_menu_color; }
- menuitem {
- min-height: 16px;
- min-width: 40px;
- padding: 4px 6px;
- text-shadow: none;
- &:hover {
- color: $selected_fg_color;
- background-color: $selected_bg_color;
- }
- &:disabled {
- color: $insensitive_fg_color;
- &:backdrop { color: $backdrop_insensitive_color; }
- }
- &:backdrop,
- &:backdrop:hover {
- color: $backdrop_fg_color;
- background-color: transparent;
- }
- // submenu indicators
- arrow {
- min-height: 16px;
- min-width: 16px;
- &:dir(ltr) {
- -gtk-icon-source: -gtk-icontheme('pan-end-symbolic');
- margin-left: 10px;
- }
- &:dir(rtl) {
- -gtk-icon-source:-gtk-icontheme('pan-end-symbolic-rtl');
- margin-right: 10px;
- }
- }
- // avoids labels color being overridden, see
- // https://bugzilla.gnome.org/show_bug.cgi?id=767058
- label { &:dir(rtl), &:dir(ltr) { color: inherit; }}
- }
- // overflow arrows
- > arrow {
- @include button(undecorated);
- min-height: 16px;
- min-width: 16px;
- padding: 4px;
- background-color: $menu_color;
- border-radius: 0;
- &.top {
- margin-top: -4px;
- border-bottom: 1px solid mix($fg_color, $base_color, 10%);
- border-top-right-radius: $menu_radius;
- border-top-left-radius: $menu_radius;
- -gtk-icon-source: -gtk-icontheme('pan-up-symbolic');
- }
- &.bottom {
- margin-top: 8px;
- margin-bottom: -12px;
- border-top: 1px solid mix($fg_color, $base_color, 10%);
- border-bottom-right-radius: $menu_radius;
- border-bottom-left-radius: $menu_radius;
- -gtk-icon-source: -gtk-icontheme('pan-down-symbolic');
- }
- &:hover { background-color: mix($fg_color, $base_color, 10%); }
- &:backdrop { background-color: $backdrop_menu_color; }
- &:disabled {
- color: transparent;
- background-color: transparent;
- border-color: transparent ;
- }
- }
- }
- menuitem {
- accelerator { color: gtkalpha(currentColor,0.55); }
- check,
- radio {
- min-height: 16px;
- min-width: 16px;
- &:dir(ltr) { margin-right: 7px; }
- &:dir(rtl) { margin-left: 7px; }
- }
- }
- /***************
- * Popovers *
- ***************/
- popover.background {
- padding: 2px;
- background-color: $popover_bg_color;
- .csd &, & {
- border: 1px solid $borders_color;
- border-radius: $popover_radius;
- }
- .csd & {
- $_popover_border: if($variant=='light', transparentize(black, 0.77), transparentize(black, 0.25));
- background-clip: padding-box;
- border-color: $_popover_border;
- }
- box-shadow: 0 1px 2px transparentize(black, 0.7);
- &:backdrop {
- background-color: $backdrop_bg_color;
- box-shadow: none;
- }
- > list,
- > .view,
- > toolbar {
- border-style: none;
- background-color: transparent;
- }
- .csd &, & {
- &.touch-selection,
- &.magnifier {
- @extend %osd;
- border: 1px solid transparentize(white, 0.9);
- button { @extend %osd_button };
- }
- &.osd { @extend %osd; }
- }
- separator { margin: 3px; }
- list separator { margin: 0px; }
- }
- /*************
- * Notebooks *
- *************/
- notebook {
- > header {
- padding: 1px;
- border-color: $borders_color;
- border-width: 1px;
- background-color: $dark_fill;
- &:backdrop {
- border-color: $backdrop_borders_color;
- background-color: $backdrop_dark_fill;
- }
- tabs { margin: -1px; }
- &.top {
- border-bottom-style: solid;
- > tabs {
- margin-bottom: -2px;
- > tab {
- &:hover { box-shadow: inset 0 -4px $borders_color; }
- &:backdrop { box-shadow: none; }
- &:checked { box-shadow: inset 0 -4px $selected_bg_color; }
- }
- }
- }
- &.bottom {
- border-top-style: solid;
- > tabs {
- margin-top: -2px;
- > tab {
- &:hover { box-shadow: inset 0 4px $borders_color; }
- &:backdrop { box-shadow: none; }
- &:checked { box-shadow: inset 0 4px $selected_bg_color; }
- }
- }
- }
- &.left {
- border-right-style: solid;
- > tabs {
- margin-right: -2px;
- > tab {
- &:hover { box-shadow: inset -4px 0 $borders_color; }
- &:backdrop { box-shadow: none; }
- &:checked { box-shadow: inset -4px 0 $selected_bg_color; }
- }
- }
- }
- &.right {
- border-left-style: solid;
- > tabs {
- margin-left: -2px;
- > tab {
- &:hover { box-shadow: inset 4px 0 $borders_color; }
- &:backdrop { box-shadow: none; }
- &:checked { box-shadow: inset 4px 0 $selected_bg_color; }
- }
- }
- }
- &.top > tabs > arrow {
- @extend %notebook_vert_arrows;
- border-top-style: none;
- }
- &.bottom > tabs > arrow {
- @extend %notebook_vert_arrows;
- border-bottom-style: none;
- }
- @at-root %notebook_vert_arrows {
- margin-left: -5px;
- margin-right: -5px;
- padding-left: 4px;
- padding-right: 4px;
- &.down { -gtk-icon-source: -gtk-icontheme('pan-start-symbolic'); }
- &.up { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic'); }
- }
- &.left > tabs > arrow {
- @extend %notebook_horz_arrows;
- border-left-style: none;
- }
- &.right > tabs > arrow {
- @extend %notebook_horz_arrows;
- border-right-style: none;
- }
- @at-root %notebook_horz_arrows {
- margin-top: -5px;
- margin-bottom: -5px;
- padding-top: 4px;
- padding-bottom: 4px;
- &.down { -gtk-icon-source: -gtk-icontheme('pan-up-symbolic'); }
- &.up { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); }
- }
- > tabs > arrow {
- @extend %button_basic;
- @extend %button_basic_flat;
- min-height: 16px;
- min-width: 16px;
- border-radius: 0;
- &:hover:not(:active):not(:backdrop) {
- background-clip: padding-box;
- background-image: none;
- background-color: transparentize(white, 0.7);
- border-color: transparent;
- box-shadow: none;
- }
- &:disabled { @include button(undecorated); }
- }
- tab {
- min-height: 30px;
- min-width: 30px;
- padding: 3px 12px;
- outline-offset: -5px;
- color: $fg_color;
- font-weight: normal;
- border-width: 1px; // for reorderable tabs
- border-color: transparent; //
- &:hover {
- color: $fg_color;
- background-color: darken($bg_color,4%);
- &.reorderable-page {
- border-color: transparentize($borders_color, 0.7);
- background-color: transparentize($bg_color, 0.8);
- }
- }
- &:backdrop {
- color: mix($backdrop_fg_color, $backdrop_bg_color, 60%);
- &.reorderable-page {
- border-color: transparent;
- background-color: transparent;
- }
- }
- &:checked {
- color: $fg_color;
- &.reorderable-page {
- border-color: transparentize($borders_color, 0.5);
- background-color: transparentize($bg_color, 0.5);
- &:hover { background-color: transparentize($bg_color, 0.3); }
- }
- }
- &:backdrop:checked {
- color: $backdrop_fg_color;
- &.reorderable-page {
- border-color: $backdrop_borders_color;
- background-color: $backdrop_bg_color;
- }
- }
- // colors the button like the label, overridden otherwise
- button.flat {
- &:hover { color: currentColor; }
- &, &:backdrop { color: gtkalpha(currentColor, 0.3); }
- padding: 0;
- margin-top: 4px;
- margin-bottom: 4px;
- // FIXME: generalize .small-button?
- min-width: 20px;
- min-height: 20px;
- &:last-child {
- margin-left: 4px;
- margin-right: -4px;
- }
- &:first-child {
- margin-left: -4px;
- margin-right: 4px;
- }
- }
- }
- &.top,
- &.bottom {
- tabs {
- padding-left: 4px;
- padding-right: 4px;
- &:not(:only-child) {
- margin-left: 3px;
- margin-right: 3px;
- &:first-child { margin-left: -1px; }
- &:last-child { margin-right: -1px; }
- }
- tab {
- margin-left: 4px;
- margin-right: 4px;
- &.reorderable-page { border-style: none solid; }
- }
- }
- }
- &.left,
- &.right {
- tabs {
- padding-top: 4px;
- padding-bottom: 4px;
- &:not(:only-child) {
- margin-top: 3px;
- margin-bottom: 3px;
- &:first-child { margin-top: -1px; }
- &:last-child { margin-bottom: -1px; }
- }
- tab {
- margin-top: 4px;
- margin-bottom: 4px;
- &.reorderable-page { border-style: solid none; }
- }
- }
- }
- &.top tab { padding-bottom: 4px; }
- &.bottom tab { padding-top: 4px; }
- }
- > stack:not(:only-child) { // the :not(:only-child) is for "hidden" notebooks
- background-color: $base_color;
- &:backdrop { background-color: $backdrop_base_color; }
- }
- }
- /**************
- * Scrollbars *
- **************/
- scrollbar {
- $_slider_min_length: 40px;
- $_slider_width: 8px;
- $_scrollbar_transition: all 300ms $ease-out-quad;
- $_fine-tune_slider_border: $_slider_width - 3; //3672
- // disable steppers
- @at-root * {
- -GtkScrollbar-has-backward-stepper: false;
- -GtkScrollbar-has-forward-stepper: false;
- }
- background-color: $scrollbar_bg_color;
- transition: $_scrollbar_transition;
- // scrollbar border
- &.top { border-bottom: 1px solid $borders_color; }
- &.bottom { border-top: 1px solid $borders_color; }
- &.left { border-right: 1px solid $borders_color; }
- &.right { border-left: 1px solid $borders_color; }
- &:backdrop {
- background-color: $backdrop_scrollbar_bg_color;
- border-color: $backdrop_borders_color;
- transition: $backdrop_transition;
- }
- // slider
- slider {
- min-width: $_slider_width;
- min-height: $_slider_width;
- margin: -1px;
- border: 4px solid transparent;
- border-radius: 10px;
- background-clip: padding-box;
- background-color: $scrollbar_slider_color;
- transition: $_scrollbar_transition;
- &:hover { background-color: $scrollbar_slider_hover_color; }
- &:hover:active { background-color: $scrollbar_slider_active_color; }
- &:backdrop { background-color: $backdrop_scrollbar_slider_color; }
- &:disabled { background-color: transparent; }
- }
- &.fine-tune {
- slider {
- transition: none;
- min-width: $_fine-tune_slider_border+1;
- min-height: $_fine-tune_slider_border+1;
- }
- &.horizontal slider { border-width: $_fine-tune_slider_border 4px; }
- &.vertical slider { border-width: 4px $_fine-tune_slider_border; }
- }
- &.overlay-indicator {
- &:not(.dragging):not(.hovering) {
- border-color: transparent;
- opacity: 0.4;
- background-color: transparent;
- slider {
- margin: 0;
- min-width: 3px;
- min-height: 3px;
- background-color: $fg_color;
- border: 1px solid if($variant == 'light', white, black);
- }
- button {
- min-width: 5px;
- min-height: 5px;
- background-color: $fg_color;
- background-clip: padding-box;
- border-radius: 100%;
- border: 1px solid if($variant == 'light', white, black);
- -gtk-icon-source: none;
- }
- &.horizontal {
- slider {
- margin: 0 2px;
- min-width: $_slider_min_length;
- }
- button {
- margin: 1px 2px;
- min-width: 5px;
- }
- }
- &.vertical {
- slider {
- margin: 2px 0;
- min-height: $_slider_min_length;
- }
- button {
- margin: 2px 1px;
- min-height: 5px;
- }
- }
- }
- &.dragging,
- &.hovering { opacity: 0.8; }
- }
- &.horizontal slider { min-width: $_slider_min_length; }
- &.vertical slider { min-height: $_slider_min_length; }
- // button styling
- button {
- padding: 0;
- min-width: 12px;
- min-height: 12px;
- border-style: none;
- border-radius: 0;
- transition-property: min-height, min-width, color;
- @include button(undecorated);
- color: $scrollbar_slider_color;
- &:hover {
- @include button(undecorated);
- color: $scrollbar_slider_hover_color;
- }
- &:active, &:checked {
- @include button(undecorated);
- color: $scrollbar_slider_active_color;
- }
- &:disabled {
- @include button(undecorated);
- color: transparentize($scrollbar_slider_color, 0.8);
- }
- &:backdrop {
- @include button(undecorated);
- color: $backdrop_scrollbar_slider_color;
- &:disabled {
- @include button(undecorated);
- color: transparentize($backdrop_scrollbar_slider_color, 0.8);
- }
- }
- }
- // button icons
- &.vertical {
- button {
- &.down { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); }
- &.up { -gtk-icon-source: -gtk-icontheme('pan-up-symbolic'); }
- }
- }
- &.horizontal {
- button {
- &.down { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic'); }
- &.up { -gtk-icon-source: -gtk-icontheme('pan-start-symbolic'); }
- }
- }
- }
- treeview ~ scrollbar.vertical {
- border-top: 1px solid $borders_color;
- margin-top: -1px;
- }
- /**********
- * Switch *
- **********/
- switch {
- outline-offset: -4px;
- // similar to the .scale
- border: 1px solid $borders_color;
- border-radius: 14px;
- color: $fg_color;
- background-color: $dark_fill;
- text-shadow: 0 1px transparentize(black, 0.9);
- &:checked {
- color: $selected_fg_color;
- border-color: $checkradio_borders_color;
- background-color: $checkradio_bg_color;
- text-shadow: 0 1px transparentize($selected_borders_color, 0.5),
- 0 0 2px transparentize(white, 0.4);
- }
- &:disabled {
- color: $insensitive_fg_color;
- border-color: $borders_color;
- background-color: $insensitive_bg_color;
- text-shadow: none;
- }
- &:backdrop {
- color: $backdrop_fg_color;
- border-color: $backdrop_borders_color;
- background-color: $backdrop_dark_fill;
- text-shadow: none;
- transition: $backdrop_transition;
- &:checked {
- @if $variant == 'light' { color: $backdrop_bg_color; }
- border-color: if($variant == 'light', $checkradio_borders_color,
- $selected_borders_color);
- background-color: $checkradio_bg_color;
- }
- &:disabled {
- color: $backdrop_insensitive_color;
- border-color: $backdrop_borders_color;
- background-color: $insensitive_bg_color;
- }
- }
- slider {
- margin: -1px;
- min-width: 24px;
- min-height: 24px;
- border: 1px solid;
- border-radius: 50%;
- transition: $button_transition;
- -gtk-outline-radius: 20px;
- @if $variant == 'light' {
- @include button(normal-alt, $edge: $shadow_color);
- }
- @else {
- @include button(normal-alt, $c: lighten($bg_color,6%), $edge: $shadow_color);
- }
- }
-
- image { color: transparent; } /* only show i / o for the accessible theme */
- &:hover slider {
- @if $variant == 'light' {
- @include button(hover-alt, $edge: $shadow_color);
- }
- @else {
- @include button(hover-alt, $c: lighten($bg_color,6%), $edge: $shadow_color);
- }
- }
- &:checked > slider { border: 1px solid $checkradio_borders_color; }
- &:disabled slider { @include button(insensitive); }
- &:backdrop {
- slider {
- transition: $backdrop_transition;
- @include button(backdrop);
- }
- &:checked > slider { border-color: $checkradio_borders_color; }
- &:disabled slider { @include button(backdrop-insensitive); }
- }
- row:selected & {
- @if $variant == 'light' {
- box-shadow: none;
- border-color: $checkradio_borders_color;
- &:backdrop { border-color: $checkradio_borders_color; }
- > slider { &:checked, & { border-color: $checkradio_borders_color; } }
- }
- }
- }
- /*************************
- * Check and Radio items *
- *************************/
- // draw regular check and radio items using our PNG assets
- // all assets are rendered from assets.svg. never add pngs directly
- //selection-mode
- @each $check_state, $check_icon, $check_color, $check_background in
- ('', 'none', 'transparent', $checkradio_bg_color),
- (':hover', 'none', 'transparent', $checkradio_bg_color),
- (':active', 'none', 'transparent', $checkradio_bg_color),
- (':backdrop', 'none', 'transparent', '#{desaturate($checkradio_bg_color, 100%)}'),
- (':checked', '-gtk-icontheme(\'object-select-symbolic\')', $osd_fg_color, $checkradio_bg_color),
- (':checked:hover', '-gtk-icontheme(\'object-select-symbolic\')', $osd_fg_color, $checkradio_bg_color),
- (':checked:active', '-gtk-icontheme(\'object-select-symbolic\')', $osd_fg_color, $checkradio_bg_color),
- (':backdrop:checked', '-gtk-icontheme(\'object-select-symbolic\')', '#{transparentize($osd_fg_color, 0.2)}', '#{desaturate($checkradio_bg_color, 100%)}'), {
- .view.content-view.check#{$check_state}:not(list),
- .content-view:not(list) check#{$check_state} {
- margin: 4px;
- min-width: 32px;
- min-height: 32px;
- color: #{$check_color};
- background-color: #{$check_background};
- border-radius: 5px;
- background-image: none;
- transition: 200ms;
- box-shadow: none;
- border-width: 0;
- -gtk-icon-source: #{$check_icon};
- -gtk-icon-shadow: none;
- }
- }
- checkbutton.text-button, radiobutton.text-button {
- // this is for a nice focus on check and radios text
- padding: 2px 0;
- outline-offset: 0;
- label:not(:only-child) {
- &:first-child { margin-left: 4px; }
- &:last-child { margin-right: 4px; }
- }
- }
- check,
- radio {
- margin: 0 4px;
- &:only-child { margin: 0; }
- popover & { // when in a popover add more space between the label and the check, reset the other side margin.
- // See https://bugzilla.gnome.org/show_bug.cgi?id=779570 for details.
- &.left:dir(rtl) {
- margin-left: 0;
- margin-right: 12px;
- }
- &.right:dir(ltr) {
- margin-left: 12px;
- margin-right: 0;
- }
- }
- min-height: 14px;
- min-width: 14px;
- border: 1px solid;
- -gtk-icon-source: none;
- & {
- // for unchecked
- $_c: if($variant=='light', white, $bg_color);
- @each $state, $t in ("", "normal"),
- (":hover", "hover"),
- (":active", "active"),
- (":disabled", "insensitive"),
- (":backdrop", "backdrop"),
- (":backdrop:disabled", 'backdrop-insensitive') {
- &#{$state} {
- @include check($t, $_c);
- }
- }
- }
- & {
- // for checked
- @each $t in (':checked'), (':indeterminate') {
- &#{$t} {
- @each $state, $t in ("", "normal"),
- (":hover", "hover"),
- (":active", "active"),
- (":disabled", "insensitive"),
- (":backdrop", "backdrop"),
- (":backdrop:disabled", 'backdrop-insensitive') {
- &#{$state} {
- @include check($t, $checkradio_bg_color, $checkradio_fg_color, $checked: true);
- }
- }
- }
- }
- }
- &:backdrop { transition: $backdrop_transition; }
-
- @if $variant == 'light' {
- // the borders of the light variant versions of checks and radios are too similar in luminosity to the selected background
- // color, hence we need special casing.
- row:selected & { border-color: $checkradio_borders_color; }
- }
- .osd & {
- @include button(osd);
- &:hover { @include button(osd); }
- &:active { @include button(osd-active); }
- &:backdrop { @include button(osd-backdrop); }
- &:disabled { @include button(osd-insensitive); }
- }
- menu menuitem & {
- margin: 0; // this is a workaround for a menu check/radio size allocation issue
- &, &:checked, &:indeterminate {
- &, &:hover, &:disabled { //FIXME use button reset mixin
- min-height: 14px;
- min-width: 14px;
- background-image: none;
- background-color: transparent;
- box-shadow: none;
- -gtk-icon-shadow: none;
- color: inherit;
- border-color: currentColor;
- }
- }
- }
- }
- %check,
- check {
- border-radius: 3px;
- &:checked { -gtk-icon-source: image(-gtk-recolor(url("assets/check-symbolic.svg")),
- -gtk-recolor(url("assets/check-symbolic.symbolic.png"))); }
- &:indeterminate { -gtk-icon-source: image(-gtk-recolor(url("assets/dash-symbolic.svg")),
- -gtk-recolor(url("assets/dash-symbolic.symbolic.png"))); }
- }
- %radio,
- radio {
- border-radius: 100%;
- &:checked { -gtk-icon-source: image(-gtk-recolor(url("assets/bullet-symbolic.svg")),
- -gtk-recolor(url("assets/bullet-symbolic.symbolic.png"))); }
- &:indeterminate { -gtk-icon-source: image(-gtk-recolor(url("assets/dash-symbolic.svg")),
- -gtk-recolor(url("assets/dash-symbolic.symbolic.png"))); }
- }
- // ANIMATION:
- // this is made with those pretty convoluted transitions, since checks and radios have to animate only on state changes,
- // the transformation is set on the active state and it get reset on the checked state.
- radio:not(:indeterminate):not(:checked):active:not(:backdrop) { -gtk-icon-transform: scale(0); }
- check:not(:indeterminate):not(:checked):active:not(:backdrop) { -gtk-icon-transform: translate(6px, -3px) rotate(-45deg) scaleY(0.2) rotate(45deg) scaleX(0); }
- radio,
- check {
- &:active { -gtk-icon-transform: scale(0, 1); } // should tackle the indeterminate state, untested
- &:checked:not(:backdrop), &:indeterminate:not(:backdrop) {
- -gtk-icon-transform: unset;
- transition: 400ms;
- }
- }
- menu menuitem {
- radio,
- check {
- &:checked:not(:backdrop), &:indeterminate:not(:backdrop) { transition: none; }
- }
- }
- treeview.view check,
- treeview.view radio {
- &:selected {
- &:focus, & {
- color: $checkradio_fg_color;
- @if $variant == 'light' { border-color: $selected_borders_color; }
- }
- }
- }
- treeview.view radio:selected { &:focus, & { @extend %radio; }} // This is a workaround
- /************
- * GtkScale *
- ************/
- %scale_trough {
- border: 1px solid $borders_color;
- border-radius: 3px;
- background-color: $dark_fill;
- &:disabled { background-color: $insensitive_bg_color; }
- &:backdrop {
- background-color: $backdrop_dark_fill;
- border-color: $backdrop_borders_color;
- transition: $backdrop_transition;
- &:disabled { background-color: $insensitive_bg_color; }
- }
- // ...on selected list rows
- row:selected & { &:disabled, & { border-color: $selected_borders_color; }}
- // OSD
- .osd & {
- border-color: $osd_borders_color;
- background-color: transparentize($osd_borders_color, 0.2);
- &:disabled { background-color: $osd_insensitive_bg_color; }
- }
- }
- %scale_highlight {
- border: 1px solid $progress_border_color;
- border-radius: 3px;
- background-color: $progress_bg_color;
- &:disabled {
- background-color: transparent;
- border-color: transparent;
- }
- &:backdrop {
- border-color: if($variant=='light', $progress_bg_color,
- $progress_border_color);
- &:disabled {
- background-color: transparent;
- border-color: transparent;
- }
- }
- // ...on selected list rows
- row:selected & { &:disabled, & { border-color: $selected_borders_color; }}
- // OSD
- .osd & {
- border-color: $osd_borders_color;
- &:disabled { border-color: transparent; }
- }
- }
- scale {
- // sizing
- $_marks_length: 6px;
- $_marks_distance: 6px;
- min-height: 10px;
- min-width: 10px;
- padding: 12px;
- // those are inside the trough node, I need them to show their own border over the trough one, so negative margin
- fill,
- highlight { margin: -1px; }
- // the slider is inside the trough, so to have make it bigger there's a negative margin
- slider {
- min-height: 18px;
- min-width: 18px;
- margin: -9px;
- }
- // click-and-hold the slider to activate
- &.fine-tune {
- &.horizontal {
- padding-top: 9px;
- padding-bottom: 9px;
- min-height: 16px;
- }
- &.vertical {
- padding-left: 9px;
- padding-right: 9px;
- min-width: 16px;
- }
- // to make the trough grow in fine-tune mode
- slider { margin: -6px; }
- fill,
- highlight,
- trough {
- border-radius: 5px;
- -gtk-outline-radius: 7px;
- }
- }
- // the backing bit
- trough {
- @extend %scale_trough;
- outline-offset: 2px;
- -gtk-outline-radius: 5px;
- }
- // the colored part of the backing bit
- highlight { @extend %scale_highlight; }
- // this is another differently styled part of the backing bit, the most relevant use case is for example
- // in media player to indicate how much video stream as been cached
- fill {
- @extend %scale_trough;
- &:backdrop, & { background-color: $borders_color; }
- &:disabled {
- &:backdrop, & {
- border-color: transparent;
- background-color: transparent;
- }
- }
- // OSD
- .osd & {
- background-color: mix($osd_fg_color, $osd_borders_color, 25%);
- &:disabled {
- &:backdrop, & {
- border-color: transparent;
- background-color: transparent;
- }
- }
- }
- }
- slider {
- @include button(normal-alt, $edge: $shadow_color);
- border: 1px solid darken($alt_borders_color, 3%);
- border-radius: 100%;
- transition: $button_transition;
- transition-property: background, border, box-shadow;
- &:hover { @include button(hover-alt, $edge: $shadow_color); }
- &:active { border-color: $progress_border_color; }
- &:disabled { @include button(insensitive); }
- &:backdrop {
- transition: $backdrop_transition;
- @include button(backdrop);
- &:disabled { @include button(backdrop-insensitive); }
- }
- // ...on selected list rows
- row:selected & { &:disabled, & { border-color: $selected_borders_color; } }
- // OSD
- .osd & {
- @include button(osd);
- border-color: darken($osd_borders_color, 3%);
- background-color: opacify($osd_bg_color, 1); // solid background needed here
- &:hover {
- @include button(osd-hover);
- background-color: opacify($osd_bg_color, 1); // solid background needed here
- }
- &:active {
- @include button(osd-active);
- background-color: opacify($osd_bg_color, 1); // solid background needed here
- }
- &:disabled {
- @include button(osd-insensitive);
- background-color: opacify($osd_bg_color, 1); // solid background needed here
- }
- &:backdrop {
- @include button(osd-backdrop);
- background-color: opacify($osd_bg_color, 1); // solid background needed here
- &:disabled {
- @include button(osd-backdrop-insensitive);
- background-color: opacify($osd_bg_color, 1); // solid background needed here
- }
- }
- }
- }
- marks,
- value {
- color: gtkalpha(currentColor, 0.55);
- font-feature-settings: "tnum";
- }
- //marks margins
- @each $scale_orient, $marks_class, $marks_pos, $marks_margin in (horizontal, top, top, bottom),
- (horizontal, bottom, bottom, top),
- (vertical, top, left, right),
- (vertical, bottom, right, left) {
- &.#{$scale_orient} marks {
- &.#{$marks_class} {
- margin-#{$marks_margin}: $_marks_distance;
- margin-#{$marks_pos}: -($_marks_distance + $_marks_length);
- }
- }
- &.#{$scale_orient}.fine-tune marks {
- &.#{$marks_class} {
- margin-#{$marks_margin}: $_marks_distance;
- margin-#{$marks_pos}: -($_marks_distance + $_marks_length - 3px);
- }
- }
- }
- &.horizontal {
- indicator {
- min-height: $_marks_length;
- min-width: 1px;
- }
- &.fine-tune indicator { min-height: ($_marks_length - 3px); }
- }
- &.vertical {
- indicator {
- min-height: 1px;
- min-width: $_marks_length;
- }
- &.fine-tune indicator { min-width: ($_marks_length - 3px); }
- }
- // *WARNING* scale with marks madness following
- // FIXME: OSD and selected list rows missing, I don't feel like adding the other 144 assets needed for those...
- $suffix: if($variant == 'light', '', '-dark');
- @each $dir_class, $dir_infix in ('horizontal', 'horz'),
- ('vertical', 'vert') {
- @each $marks_infix, $marks_class in ('scale-has-marks-above', 'marks-before:not(.marks-after)'),
- ('scale-has-marks-below', 'marks-after:not(.marks-before)') {
- @each $state, $state_infix in ('', ''),
- (':hover', '-hover'),
- (':active', '-active'),
- (':disabled', '-insensitive'),
- (':backdrop', '-backdrop'),
- (':backdrop:disabled', '-backdrop-insensitive') {
- &.#{$dir_class}.#{$marks_class} {
- slider {
- &#{$state} {
- // an asymmetric slider asset is used here, so the margins are uneven, the smaller
- // margin is set on the point side.
- margin: -10px;
- $_scale_asset: 'assets/slider-#{$dir_infix}-#{$marks_infix}#{$state_infix}#{$suffix}';
- border-style: none;
- border-radius: 0;
- background-color: transparent;
- background-image: -gtk-scaled(url('#{$_scale_asset}.png'), url('#{$_scale_asset}@2.png'));
- $_scale_slider_bg_pos: bottom;
- @if $dir_class == 'horizontal' {
- min-height: 26px;
- min-width: 22px;
- @if $marks_infix == 'scale-has-marks-above' {
- margin-top: -14px;
- $_scale_slider_bg_pos: top;
- }
- @else { margin-bottom: -14px; }
- }
- @else {
- min-height: 22px;
- min-width: 26px;
- @if $marks_infix == 'scale-has-marks-above' {
- margin-left: -14px;
- $_scale_slider_bg_pos: left bottom;
- }
- @else {
- margin-right: -14px;
- $_scale_slider_bg_pos: right bottom;
- }
- }
- background-position: $_scale_slider_bg_pos;
- background-repeat: no-repeat;
- box-shadow: none;
- }
- }
- &.fine-tune slider {
- // bigger negative margins to make the trough grow here as well
- margin: -7px;
- @if $dir_class == 'horizontal' {
- @if $marks_infix == 'scale-has-marks-above' { margin-top: -11px; }
- @else { margin-bottom: -11px; }
- }
- @else {
- @if $marks_infix == 'scale-has-marks-above' { margin-left: -11px; }
- @else { margin-right: -11px; }
- }
- }
- }
- }
- }
- }
- &.color {
- min-height: 0;
- min-width: 0;
- trough {
- background-image: image($borders_color);
- background-repeat: no-repeat;
- }
- &.horizontal {
- padding: 0 0 15px 0;
- trough {
- padding-bottom: 4px;
- background-position: 0 -3px;
- border-top-left-radius: 0;
- border-top-right-radius: 0;
- }
- slider {
- &:dir(ltr), &:dir(rtl) { // specificity bumb
- &:hover, &:backdrop, &:disabled, &:backdrop:disabled, & {
- margin-bottom: -15px;
- margin-top: 6px;
- }
- }
- }
- }
- &.vertical {
- &:dir(ltr) {
- padding: 0 0 0 15px;
- trough {
- padding-left: 4px;
- background-position: 3px 0;
- border-bottom-right-radius: 0;
- border-top-right-radius: 0;
- }
- slider {
- &:hover, &:backdrop, &:disabled, &:backdrop:disabled, & {
- margin-left: -15px;
- margin-right: 6px;
- }
- }
- }
- &:dir(rtl) {
- padding: 0 15px 0 0;
- trough {
- padding-right: 4px;
- background-position: -3px 0;
- border-bottom-left-radius: 0;
- border-top-left-radius: 0;
- }
- slider {
- &:hover, &:backdrop, &:disabled, &:backdrop:disabled, & {
- margin-right: -15px;
- margin-left: 6px;
- }
- }
- }
- }
- &.fine-tune {
- &.horizontal {
- &:dir(ltr), &:dir(rtl) { // specificity bump
- padding: 0 0 12px 0;
- trough {
- padding-bottom: 7px;
- background-position: 0 -6px;
- }
- slider {
- margin-bottom: -15px;
- margin-top: 6px;
- }
- }
- }
- &.vertical {
- &:dir(ltr) {
- padding: 0 0 0 12px;
- trough {
- padding-left: 7px;
- background-position: 6px 0;
- }
- slider {
- margin-left: -15px;
- margin-right: 6px;
- }
- }
- &:dir(rtl) {
- padding: 0 12px 0 0;
- trough {
- padding-right: 7px;
- background-position: -6px 0;
- }
- slider {
- margin-right: -15px;
- margin-left: 6px;
- }
- }
- }
- }
- }
- }
- /*****************
- * Progress bars *
- *****************/
- progressbar {
- // sizing
- &.horizontal {
- trough,
- progress { min-height: 2px; }
- }
- &.vertical {
- trough,
- progress { min-width: 2px; }
- }
- &.horizontal progress { margin: 0 -1px; } // the progress node is positioned after the trough border
- &.vertical progress { margin: -1px 0; } // this moves it over it.
- // FIXME: insensitive state missing and some other state should be set probably
- font-size: smaller;
- color: transparentize($fg_color, 0.6);
- font-feature-settings: "tnum";
- &:backdrop {
- box-shadow: none;
- transition: $backdrop_transition;
- }
- trough { @extend %scale_trough; }
- progress {
- @extend %scale_highlight;
- border-radius: 1.5px;
- &.left {
- border-top-left-radius: 2px;
- border-bottom-left-radius: 2px;
- }
- &.right {
- border-top-right-radius: 2px;
- border-bottom-right-radius: 2px;
- }
- &.top {
- border-top-right-radius: 2px;
- border-top-left-radius: 2px;
- }
- &.bottom {
- border-bottom-right-radius: 2px;
- border-bottom-left-radius: 2px;
- }
- }
- &.osd { // progressbar.osd used for epiphany page loading progress
- min-width: 3px;
- min-height: 3px;
- background-color: transparent;
- trough {
- border-style: none;
- border-radius: 0;
- background-color: transparent;
- box-shadow: none;
- }
- progress {
- border-style: none;
- border-radius: 0;
- }
- }
- trough.empty progress { all: unset; } // makes the progress indicator disappear, when the fraction is 0
- }
- /*************
- * Level Bar *
- *************/
- levelbar {
- &.horizontal {
- block {
- min-height: 1px;
- }
- &.discrete block {
- margin: 0 1px;
- min-width: 32px;
- }
- }
- &.vertical {
- block {
- min-width: 1px;
- }
- &.discrete block {
- margin: 1px 0;
- min-height: 32px;
- }
- }
- &:backdrop { transition: $backdrop_transition; }
- trough {
- border: 1px solid;
- padding: 2px;
- border-radius: 3px;
- @include entry(normal);
- &:backdrop { @include entry(backdrop); }
- }
- block {
- border: 1px solid;
- border-radius: 1px;
- &.low {
- border-color: if($variant == 'light', darken($warning_color, 20%), $warning_color);
- background-color: $warning_color;
- &:backdrop { border-color: $warning_color; };
- }
- &.high,
- &:not(.empty) {
- border-color: if($variant == 'light', darken($progress_bg_color, 20%), $progress_bg_color);
- background-color: $progress_bg_color;
- &:backdrop { border-color: $progress_bg_color; }
- }
- &.full {
- border-color: if($variant == 'light', darken($success_color, 20%), $success_color);
- background-color: $success_color;
- &:backdrop { border-color: $success_color; };
- }
- &.empty {
- background-color: transparent;
- border-color: if($variant == 'light', transparentize($fg_color,0.8), transparentize($fg_color,0.9));
- &:backdrop { border-color: transparentize($backdrop_fg_color,0.85); }
- }
- }
- }
- /****************
- * Print dialog *
- *****************/
- printdialog {
- paper {
- color: $fg_color;
- border: 1px solid $borders_color;
- background: white;
- padding: 0;
- &:backdrop {
- color: $backdrop_fg_color;
- border-color: $backdrop_borders_color;
- }
- }
- .dialog-action-box { margin: 12px; }
- }
- /**********
- * Frames *
- **********/
- frame > border,
- .frame {
- box-shadow: none;
- margin: 0;
- padding: 0;
- border-radius: 0;
- border: 1px solid $borders_color;
- &.flat { border-style: none; }
- &:backdrop { border-color: $backdrop_borders_color; }
- }
- actionbar > revealer > box {
- padding: 6px;
- border-top: 1px solid $borders_color;
- &:backdrop { border-color: $backdrop_borders_color; }
- }
- scrolledwindow {
- viewport.frame { // avoid double borders when viewport inside scrolled window
- border-style: none;
- }
- // This is used when content is touch-dragged past boundaries.
- // draws a box on top of the content, the size changes programmatically.
- overshoot {
- &.top {
- @include overshoot(top);
- &:backdrop { @include overshoot(top, backdrop); }
- }
- &.bottom {
- @include overshoot(bottom);
- &:backdrop { @include overshoot(bottom, backdrop); }
- }
- &.left {
- @include overshoot(left);
- &:backdrop { @include overshoot(left, backdrop); }
- }
- &.right {
- @include overshoot(right);
- &:backdrop { @include overshoot(right, backdrop); }
- }
- }
- junction { // the small square between two scrollbars
- border-color: transparent;
- // the border image is used to add the missing dot between the borders, details, details, details...
- border-image: linear-gradient(to bottom, $borders_color 1px, transparent 1px) 0 0 0 1 / 0 1px stretch;
- background-color: $scrollbar_bg_color;
- &:dir(rtl) { border-image-slice: 0 1 0 0; }
- &:backdrop {
- border-image-source: linear-gradient(to bottom, $backdrop_borders_color 1px, transparent 1px);
- background-color: $backdrop_scrollbar_bg_color;
- transition: $backdrop_transition;
- }
- }
- }
- //vbox and hbox separators
- separator {
- background: transparentize(black, 0.9);
- min-width: 1px;
- min-height: 1px;
- }
- /*********
- * Lists *
- *********/
- list {
- color: $text_color;
- background-color: $base_color;
- border-color: $borders_color;
- &:backdrop {
- color: $backdrop_text_color;
- background-color: $backdrop_base_color;
- border-color: $backdrop_borders_color;
- }
- row { padding: 2px; }
- }
- row {
- transition: all 150ms $ease-out-quad;
- &:hover { transition: none; }
- &:backdrop { transition: $backdrop_transition; }
- &.activatable {
- &.has-open-popup, // this is for indicathing which row generated a popover see https://bugzilla.gnome.org/show_bug.cgi?id=754411
- &:hover { background-color: if(variant == light, transparentize($fg_color, 0.9), transparentize($fg_color, 0.95)); }
- &:active { box-shadow: inset 0 2px 2px -2px transparentize(black, 0.8); }
- &:backdrop:hover { background-color: transparent; }
- &:selected {
- &:active { box-shadow: inset 0 2px 3px -1px transparentize(black, 0.5); }
- &.has-open-popup,
- &:hover { background-color: mix($fg_color, $selected_bg_color, 10%); }
- &:backdrop { background-color: $selected_bg_color; }
- }
- }
- &:selected { @extend %selected_items; }
- }
- /*********************
- * App Notifications *
- *********************/
- .app-notification,
- .app-notification.frame {
- @extend %osd;
- padding: 10px;
- border-radius: 0 0 5px 5px;
- background-color: $osd_bg_color;
- background-image: linear-gradient(to bottom, transparentize(black, 0.8),
- transparent 2px);
- background-clip: padding-box;
- &:backdrop {
- background-image: none;
- transition: $backdrop_transition;
- }
- button { @extend %osd_button; }
- border { border: none; }
- }
- /*************
- * Expanders *
- *************/
- expander {
- title > arrow {
- min-width: 16px;
- min-height: 16px;
- -gtk-icon-source: -gtk-icontheme('pan-end-symbolic');
- &:dir(rtl) { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic-rtl'); }
- &:hover { color: lighten($fg_color,30%); } //only lightens the arrow
- &:disabled { color: $insensitive_fg_color; }
- &:disabled:backdrop { color: $backdrop_insensitive_color; }
- &:checked { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); }
- }
- }
- /************
- * Calendar *
- ***********/
- calendar {
- color: $text_color;
- border: 1px solid $borders_color;
- &:selected {
- @extend %selected_items;
- border-radius: 3px;
- }
- &.header {
- border-bottom-color: transparentize(black, 0.9);
- &:backdrop { border-bottom-color: transparentize(black, 0.9); }
- }
- &.button {
- @extend %undecorated_button;
- color: transparentize($fg_color, 0.55);
- &:hover { color: $fg_color; }
- &:backdrop { color: transparentize($backdrop_fg_color,0.55); }
- &:disabled { color: transparentize($insensitive_fg_color,0.55); }
- }
- &.highlight {
- color: $insensitive_fg_color;
- &:backdrop { color: $backdrop_insensitive_color; }
- }
- &:backdrop {
- color: $backdrop_text_color;
- border-color: $backdrop_borders_color;
- }
- &:indeterminate { color: gtkalpha(currentColor, 0.1); }
- }
- /***********
- * Dialogs *
- ***********/
- messagedialog { // Message Dialog styling
- .titlebar {
- min-height: 20px;
- background-image: none;
- background-color: $bg_color;
- border-style: none;
- border-top-left-radius: 7px;
- border-top-right-radius: 7px;
- }
- &.csd { // rounded bottom border styling for csd version
- &.background {
- // bigger radius for better antialiasing
- border-bottom-left-radius: $window_radius+1;
- border-bottom-right-radius: $window_radius+1;
- }
- .dialog-action-area button {
- padding: 10px 14px; // labels are not vertically centered on message dialog, this is a workaround
- border-right-style: none;
- border-bottom-style: none;
- border-radius: 0;
- -gtk-outline-radius: 0;
- &:first-child {
- border-left-style: none;
- border-bottom-left-radius: $button_radius + 2;
- -gtk-outline-bottom-left-radius: $button_radius + 2;
- }
- &:last-child {
- border-bottom-right-radius: $button_radius + 2;
- -gtk-outline-bottom-right-radius: $button_radius + 2;
- }
- }
- }
- }
- filechooser {
- .dialog-action-box {
- border-top: 1px solid $borders_color;
- &:backdrop { border-top-color: $backdrop_borders_color; }
- }
- #pathbarbox { border-bottom: 1px solid $bg_color; }
- }
- filechooserbutton:drop(active) {
- box-shadow: none;
- border-color: transparent;
- }
- /***********
- * Sidebar *
- ***********/
- .sidebar {
- border-style: none;
- background-color: mix($bg_color, $base_color, 50%);
- &:not(separator) {
- @at-root %sidebar_left,
- &:dir(ltr),
- &.left,
- &.left:dir(rtl) {
- border-right: 1px solid $borders_color;
- border-left-style: none;
- }
- @at-root %sidebar_right,
- &:dir(rtl),
- &.right {
- border-left: 1px solid $borders_color;
- border-right-style: none;
- }
- }
- &:backdrop {
- background-color: $backdrop_sidebar_bg_color;
- border-color: $backdrop_borders_color;
- transition: $backdrop_transition;
- }
- list { background-color: transparent; }
- paned & { &.left, &.right, &.left:dir(rtl), &:dir(rtl), &:dir(ltr), & { border-style: none; }}
- }
- stacksidebar {
- &.sidebar {
- &:dir(ltr),
- &.left,
- &.left:dir(rtl) { list { @extend %sidebar_left; }}
- &:dir(rtl),
- &.right { list { @extend %sidebar_right; }}
- }
- row {
- padding: 10px 4px;
- > label {
- padding-left: 6px;
- padding-right: 6px;
- }
- &.needs-attention > label {
- @extend %needs_attention;
- background-size: 6px 6px, 0 0;
- }
- }
- }
- separator.sidebar {
- background-color: $borders_color;
- &:backdrop {
- background-color: $backdrop_borders_color;
- }
- &.selection-mode,
- .selection-mode & {
- background-color: darken($suggested_bg_color, 20%);
- }
- }
- /****************
- * File chooser *
- ****************/
- $_placesidebar_icons_opacity: 0.7;
- row image.sidebar-icon { opacity: $_placesidebar_icons_opacity; } // dim the sidebar icons
- // see bug #786613 for details
- // on this oddity
- placessidebar {
- > viewport.frame { border-style: none; }
- row {
- // Needs overriding of the GtkListBoxRow padding
- min-height: 36px;
- padding: 0px;
- // Using margins/padding directly in the SidebarRow
- // will make the animation of the new bookmark row jump
- > revealer { padding: 0 14px; }
- &:selected { color: $selected_fg_color; }
- &:disabled { color: $insensitive_fg_color; }
- &:backdrop {
- color: $backdrop_fg_color;
- &:selected { color: $backdrop_selected_fg_color; }
- &:disabled { color: $backdrop_insensitive_color; }
- }
- image.sidebar-icon {
- &:dir(ltr) { padding-right: 8px; }
- &:dir(rtl) { padding-left: 8px; }
- }
- label.sidebar-label {
- &:dir(ltr) { padding-right: 2px; }
- &:dir(rtl) { padding-left: 2px; }
- }
- @at-root button.sidebar-button {
- @extend %button_basic_flat;
- @extend %button_selected_flat;
- min-height: 26px;
- min-width: 26px;
- margin-top: 3px;
- margin-bottom: 3px;
- padding: 0;
- border-radius: 100%;
- -gtk-outline-radius: 100%;
- &:not(:hover):not(:active),
- &:backdrop { > image { opacity: $_placesidebar_icons_opacity; }}
- }
- // in the sidebar case it makes no sense to click the selected row
- &:selected:active { box-shadow: none; }
- &.sidebar-placeholder-row {
- padding: 0 8px;
- min-height: 2px;
- background-image: image($drop_target_color);
- background-clip: content-box;
- }
- &.sidebar-new-bookmark-row { color: $selected_bg_color; }
- &:drop(active):not(:disabled) {
- color: $drop_target_color;
- box-shadow: inset 0 1px $drop_target_color,
- inset 0 -1px $drop_target_color;
- &:selected {
- color: $selected_fg_color;
- background-color: $drop_target_color;
- }
- }
- }
- }
- placesview {
- .server-list-button > image {
- transition: 200ms $ease-out-quad;
- -gtk-icon-transform: rotate(0turn);
- }
- .server-list-button:checked > image {
- transition: 200ms $ease-out-quad;
- -gtk-icon-transform: rotate(-0.5turn);
- }
- row.activatable:hover { background-color: transparent; }
- // this selects the "connect to server" label
- > actionbar > revealer > box > label {
- padding-left: 8px;
- padding-right: 8px;
- }
- }
- /*********
- * Paned *
- *********/
- paned {
- > separator {
- min-width: 1px;
- min-height: 1px;
- -gtk-icon-source: none; // defeats the ugly default handle decoration
- border-style: none; // just to be sure
- background-color: transparent;
- // workaround, using background istead of a border since the border will get rendered twice (?)
- background-image: image($borders_color);
- background-size: 1px 1px;
- &:selected { background-image: image($selected_bg_color); } // FIXME is this needed?
- &:backdrop { background-image: image($backdrop_borders_color); }
- &.wide {
- min-width: 5px;
- min-height: 5px;
- background-color: $bg_color;
- background-image: image($borders_color), image($borders_color);
- background-size: 1px 1px, 1px 1px;
- &:backdrop {
- background-color: $backdrop_bg_color;
- background-image: image($backdrop_borders_color),
- image($backdrop_borders_color);
- }
- }
- }
- &.horizontal > separator {
- background-repeat: repeat-y;
- &:dir(ltr) {
- margin: 0 -8px 0 0;
- padding: 0 8px 0 0;
- background-position: left;
- }
- &:dir(rtl) {
- margin: 0 0 0 -8px;
- padding: 0 0 0 8px;
- background-position: right;
- }
- &.wide {
- margin: 0;
- padding: 0;
- background-repeat: repeat-y, repeat-y;
- background-position: left, right;
- }
- }
- &.vertical > separator {
- margin: 0 0 -8px 0;
- padding: 0 0 8px 0;
- background-repeat: repeat-x;
- background-position: top;
- &.wide {
- margin: 0;
- padding: 0;
- background-repeat: repeat-x, repeat-x;
- background-position: bottom, top;
- }
- }
- }
- /**************
- * GtkInfoBar *
- **************/
- infobar {
- border-style: none;
- &.action:hover > revealer > box {
- background-color: if($variant == 'light', desaturate(lighten(invert($selected_bg_color), 47%), 30%),
- desaturate(darken(invert($selected_bg_color),42%), 70%));
- border-bottom: 1px solid lighten($borders_color, 5%);
- }
- &.info,
- &.question,
- &.warning,
- &.error {
- &:backdrop > revealer > box, & > revealer > box {
- label, & { color: $fg_color; }
- background-color: if($variant == 'light', desaturate(lighten(invert($selected_bg_color), 45%), 30%),
- desaturate(darken(invert($selected_bg_color),40%), 70%));
- border-bottom: 1px solid lighten($borders_color, 5%);
- }
- text-shadow: none;
- &:backdrop { text-shadow: none; }
- button {
- // FIXME: extend selection mode buttons
- @include button(normal, $bg_color, $fg_color, none);
- &:hover { @include button(hover, $bg_color, $fg_color, none); }
- &:active,
- &:checked { @include button(active, $bg_color, $fg_color, none); }
- &:disabled { @include button(insensitive,$bg_color,$fg_color,none); }
- &:backdrop {
- @include button(backdrop, $bg_color, $fg_color, none);
- border-color: _border_color($bg_color);
- &:disabled {
- @include button(backdrop-insensitive, $bg_color,
- $fg_color, none);
- border-color: _border_color($bg_color);
- }
- }
- &:backdrop, & {
- label, & { color: $fg_color; }
- }
- }
- selection { background-color: darken($bg_color, 10%); }
- *:link { color: $link_color; }
- }
- }
- /************
- * Tooltips *
- ************/
- tooltip {
- &.background {
- // background-color needs to be set this way otherwise it gets drawn twice
- // see https://bugzilla.gnome.org/show_bug.cgi?id=736155 for details.
- background-color: transparentize(black, 0.1);
- background-clip: padding-box;
- border: 1px solid $tooltip_borders_color; // this suble border is meant to
- // not make the tooltip melt with
- // very dark backgrounds
- }
- padding: 4px; /* not working */
- border-radius: 5px;
- box-shadow: none; // otherwise it gets inherited by windowframe.csd
- text-shadow: 0 1px black;
- // FIXME: we need a border or tooltips vanish on black background.
- decoration { background-color: transparent; }
- * { // Yeah this is ugly
- padding: 2px;
- background-color: transparent;
- color: white;
- }
- }
- /*****************
- * Color Chooser *
- *****************/
- colorswatch {
- // This widget is made of two boxes one on top of the other, the lower box is colorswatch {} the other one
- // is colorswatch overlay {}, colorswatch has the programmatically set background, so most of the style is
- // applied to the overlay box.
- &:drop(active), & { border-style: none; } // FIXME: implement a proper drop(active) state
- $_colorswatch_radius: 5px;
- // base color corners rounding
- // to avoid the artifacts caused by rounded corner anti-aliasing the base color
- // sports a bigger radius.
- // nth-child is needed by the custom color strip.
- &.top {
- border-top-left-radius: $_colorswatch_radius + 0.5px;
- border-top-right-radius: $_colorswatch_radius + 0.5px;
- overlay {
- border-top-left-radius: $_colorswatch_radius;
- border-top-right-radius: $_colorswatch_radius;
- }
- }
- &.bottom {
- border-bottom-left-radius: $_colorswatch_radius + 0.5px;
- border-bottom-right-radius: $_colorswatch_radius + 0.5px;
- overlay {
- border-bottom-left-radius: $_colorswatch_radius;
- border-bottom-right-radius: $_colorswatch_radius;
- }
- }
- &.left,
- &:first-child:not(.top) {
- border-top-left-radius: $_colorswatch_radius + 0.5px;
- border-bottom-left-radius: $_colorswatch_radius + 0.5px;
- overlay {
- border-top-left-radius: $_colorswatch_radius;
- border-bottom-left-radius: $_colorswatch_radius;
- }
- }
- &.right,
- &:last-child:not(.bottom) {
- border-top-right-radius: $_colorswatch_radius + 0.5px;
- border-bottom-right-radius: $_colorswatch_radius + 0.5px;
- overlay {
- border-top-right-radius: $_colorswatch_radius;
- border-bottom-right-radius: $_colorswatch_radius;
- }
- }
- &.dark {
- outline-color: transparentize(white, 0.4);
- overlay {
- color: white;
- &:hover { border-color: if($variant == 'light', transparentize(black, 0.2), $borders_color); }
- &:backdrop { color: transparentize(white, 0.5); }
- }
- }
- &.light {
- outline-color: transparentize(black, 0.4);
- overlay {
- color: black;
- &:hover { border-color: if($variant == 'light', transparentize(black, 0.5), $borders_color); }
- &:backdrop { color: transparentize(black, 0.5); }
- }
- }
- &:drop(active) {
- box-shadow: none;
- &.light overlay {
- border-color: $drop_target_color;
- box-shadow: inset 0 0 0 2px if($variant == 'light', darken($drop_target_color, 7%), $borders_color),
- inset 0 0 0 1px $drop_target_color;
- }
- &.dark overlay {
- border-color: $drop_target_color;
- box-shadow: inset 0 0 0 2px if($variant == 'light', transparentize(black, 0.7), $borders_color),
- inset 0 0 0 1px $drop_target_color;
- }
- }
- overlay {
- border: 1px solid if($variant == 'light', transparentize(black, 0.7), $borders_color);
- &:hover {
- box-shadow: inset 0 1px transparentize(white, 0.6),
- inset 0 -1px transparentize(black, 0.8);
- }
- &:backdrop, &:backdrop:hover {
- border-color: if($variant == 'light', transparentize(black, 0.7), $borders_color);
- box-shadow: none;
- }
- }
- &#add-color-button {
- border-radius: $_colorswatch_radius $_colorswatch_radius 0 0;
- &:only-child { border-radius: $_colorswatch_radius; }
- overlay {
- @include button(normal);
- &:hover { @include button(hover); }
- &:backdrop { @include button(backdrop); }
- }
- }
- &:disabled {
- opacity: 0.5;
- overlay {
- border-color: transparentize(black, 0.4);
- box-shadow: none;
- }
- }
- row:selected & { box-shadow: 0 0 0 2px $selected_fg_color; }
- &#editor-color-sample {
- border-radius: 4px;
- overlay { border-radius: 4.5px; }
- }
- }
- // colorscale popup
- colorchooser .popover.osd { border-radius: 5px; }
- /********
- * Misc *
- ********/
- //content view (grid/list)
- .content-view {
- background-color: darken($bg_color,7%);
- &:hover { -gtk-icon-effect: highlight; }
- &:backdrop { background-color: darken($bg_color,7%); }
- rubberband, .rubberband { @extend rubberband; }
- }
- .scale-popup {
- .osd & { @extend %osd; }
- .osd & button.flat { //FIXME: quick hack, redo properly
- border-style: none;
- border-radius: 5px;
- }
- button { // +/- buttons on GtkVolumeButton popup
- &:hover {
- @extend %undecorated_button;
- background-color: transparentize($fg_color,0.9);
- border-radius: 5px;
- }
- &:backdrop { &:hover, &:disabled, & { @extend %undecorated_button; }}
- }
- }
- /**********************
- * Window Decorations *
- *********************/
- decoration {
- border-radius: $window_radius $window_radius 0 0;
- // lamefun trick to get rounded borders regardless of CSD use
- border-width: 0px;
- // this needs to be transparent
- // see bug #722563
- $_wm_border: if($variant=='light', transparentize(black, 0.77), transparentize(black, 0.25));
- $_wm_border_backdrop: if($variant=='light', transparentize(black, 0.82), transparentize(black, 0.25));
- box-shadow: 0 3px 9px 1px transparentize(black, 0.5),
- 0 0 0 1px $_wm_border; //doing borders with box-shadow
- // FIXME rationalize shadows
- // this is used for the resize cursor area
- margin: 10px;
- &:backdrop {
- // the transparent shadow here is to enforce that the shadow extents don't
- // change when we go to backdrop, to prevent jumping windows.
- // The biggest shadow should be in the same order then in the active state
- // or the jumping will happen during the transition.
- box-shadow: 0 3px 9px 1px transparent,
- 0 2px 6px 2px transparentize(black, 0.8),
- 0 0 0 1px $_wm_border_backdrop;
- transition: $backdrop_transition;
- }
- .maximized &,
- .fullscreen & { border-radius: 0; box-shadow: none; }
- .tiled &,
- .tiled-top &,
- .tiled-right &,
- .tiled-bottom &,
- .tiled-left & {
- border-radius: 0;
- box-shadow: 0 0 0 1px $_wm_border,
- 0 0 0 20px transparent; //transparent control workaround -- #3670
- &:backdrop { box-shadow: 0 0 0 1px $_wm_border_backdrop,
- 0 0 0 20px transparent; // #3670
- }
- }
- .popup & { box-shadow: none; }
- // server-side decorations as used by mutter
- // just doing borders, wm draws actual shadows
- .ssd & { box-shadow: 0 0 0 1px $_wm_border; }
- .ssd &:backdrop { box-shadow: 0 0 0 1px $_wm_border_backdrop; }
- .ssd.maximized &,
- .ssd.maximized &:backdrop { box-shadow: none; }
- .csd.popup & {
- border-radius: $menu_radius;
- box-shadow: 0 1px 2px transparentize(black, 0.8),
- 0 0 0 1px transparentize($_wm_border, 0.1);
- }
- tooltip.csd & {
- border-radius: 5px;
- box-shadow: none;
- }
- messagedialog.csd & {
- border-radius: $window_radius;
- box-shadow: 0 1px 2px transparentize(black, 0.8),
- 0 0 0 1px transparentize($_wm_border, 0.1);
- }
- .solid-csd & {
- margin: 0;
- padding: 4px;
- background-color: $borders_color;
- border: solid 1px $borders_color;
- border-radius: 0;
- box-shadow: inset 0 0 0 3px $headerbar_color, inset 0 1px $top_hilight;
- &:backdrop { box-shadow: inset 0 0 0 3px $backdrop_bg_color, inset 0 1px $top_hilight; }
- }
- }
- // Window Close button
- button.titlebutton {
- @extend %button_basic;
- @extend %button_basic_flat;
- @include _button_text_shadow;
- &:not(.appmenu) {
- border-radius: 9999px;
- padding: $_hb_btn_pad;
- margin: 0 2px;
- min-width: 0;
- min-height: 0;
- }
- .selection-mode & {
- @extend %selection_mode_button_flat;
- @extend %nobg_selected_items;
- }
- &:backdrop { -gtk-icon-shadow: none; }
- }
- .selection-mode headerbar button.titlebutton,
- .selection-mode .titlebar button.titlebutton,
- headerbar.selection-mode button.titlebutton,
- .titlebar.selection-mode button.titlebutton {
- @include _button_text_shadow(white, $suggested_bg_color);
- &:backdrop { -gtk-icon-shadow: none; }
- }
- // catch all extend :)
- %selected_items {
- background-color: $selected_bg_color;
- @at-root %nobg_selected_items, & {
- color: $selected_fg_color;
- @at-root %selected_items_disabled,
- &:disabled { color: mix($selected_fg_color, $selected_bg_color, 50%); }
- @at-root %selected_items_backdrop,
- &:backdrop {
- color: $backdrop_selected_fg_color;
- &:disabled { color: mix($backdrop_selected_fg_color, $selected_bg_color, 30%); }
- }
- }
- }
- .monospace { font-family: monospace; }
- /**********************
- * Touch Copy & Paste *
- *********************/
- //touch selection handlebars for the Popover.osd above
- cursor-handle {
- background-color: transparent;
- background-image: none;
- box-shadow: none;
- border-style: none;
- @each $s,$as in ('',''),
- (':hover','-hover'),
- (':active','-active') { //no need for insensitive and backdrop
- &.top#{$s}:dir(ltr), &.bottom#{$s}:dir(rtl) {
- $_url: 'assets/text-select-start#{$as}#{$asset_suffix}';
- -gtk-icon-source: -gtk-scaled(url('#{$_url}.png'),
- url('#{$_url}@2.png'));
- padding-left: 10px;
- }
- &.bottom#{$s}:dir(ltr), &.top#{$s}:dir(rtl) {
- $_url: 'assets/text-select-end#{$as}#{$asset_suffix}';
- -gtk-icon-source: -gtk-scaled(url('#{$_url}.png'),
- url('#{$_url}@2.png'));
- padding-right: 10px;
- }
- &.insertion-cursor#{$s}:dir(ltr), &.insertion-cursor#{$s}:dir(rtl) {
- $_url: 'assets/slider-horz-scale-has-marks-above#{$as}#{$asset_suffix}';
- -gtk-icon-source: -gtk-scaled(url('#{$_url}.png'),
- url('#{$_url}@2.png'));
- }
- }
- }
- .context-menu { font: initial; } // Decouple the font of context menus from their entry/textview
- // shortcut window keys
- .keycap {
- min-width: 20px;
- min-height: 25px;
- margin-top: 2px;
- padding-bottom: 3px;
- padding-left: 6px;
- padding-right: 6px;
- color: $fg_color;
- background-color: $base_color;
- border: 1px solid;
- border-color: if($variant == 'light', mix($borders_color, $bg_color, 50%), $borders_color);
- border-radius: 5px;
- box-shadow: if($variant == 'light', inset 0 -3px mix($base_color, $bg_color, 20%), inset 0 -3px mix($borders_color, $base_color, 60%));
- font-size: smaller;
- &:backdrop {
- background-color: $backdrop_base_color;
- color: $backdrop_fg_color;
- transition: $backdrop_transition;
- }
- }
- :not(decoration):not(window):drop(active):focus,
- :not(decoration):not(window):drop(active) { // FIXME needs to be done widget by widget, this wildcard should really die
- border-color: $drop_target_color;
- box-shadow: inset 0 0 0 1px $drop_target_color;
- caret-color: $drop_target_color;
- }
- stackswitcher button.text-button { min-width: 100px; } // FIXME aggregate with buttons
- stackswitcher button.circular,
- stackswitcher button.text-button.circular { // FIXME aggregate with buttons
- min-width: 32px;
- min-height: 32px;
- padding: 0;
- }
- /*************
- * App Icons *
- *************/
- /* Outline for low res icons */
- .lowres-icon {
- -gtk-icon-shadow: 0 -1px rgba(0,0,0,0.05),
- 1px 0 rgba(0,0,0,0.1),
- 0 1px rgba(0,0,0,0.3),
- -1px 0 rgba(0,0,0,0.1);
- }
- /* Dropshadow for large icons */
- .icon-dropshadow {
- -gtk-icon-shadow: 0 1px 12px rgba(0,0,0,0.05),
- 0 -1px rgba(0,0,0,0.05),
- 1px 0 rgba(0,0,0,0.1),
- 0 1px rgba(0,0,0,0.3),
- -1px 0 rgba(0,0,0,0.1);
- }
- /*********
- * Emoji *
- ********/
- popover.emoji-picker {
- padding-left: 0;
- padding-right: 0;
- entry.search { margin: 3px 5px 5px 5px; }
- }
- button.emoji-section {
- border-color: transparent;
- border-width: 3px;
- border-style: none none solid;
- border-radius: 0;
- margin: 2px 4px 2px 4px;
- padding: 3px 0 0;
- min-width: 32px;
- min-height: 28px;
- /* reset props inherited from the button style */
- background: none;
- box-shadow: none;
- text-shadow: none;
- outline-offset: -5px;
- &:first-child { margin-left: 7px; }
- &:last-child { margin-right: 7px; }
- &:backdrop:not(:checked) { border-color: transparent; }
- &:hover { border-color: if($variant == 'light', $borders_color, transparentize($fg_color, .9)); }
- &:checked { border-color: $selected_bg_color; }
- label {
- padding: 0;
- opacity: 0.55;
- }
- &:hover label { opacity: 0.775; }
- &:checked label { opacity: 1; }
- }
- popover.emoji-picker .emoji {
- font-size: x-large;
- padding: 6px;
- :hover {
- background: $selected_bg_color;
- border-radius: 6px;
- }
- }
- popover.emoji-completion arrow {
- border: none;
- background: none;
- }
- popover.emoji-completion contents row box {
- padding: 2px 10px;
- }
- popover.emoji-completion .emoji:hover {
- background: $popover_hover_color;
- }
|