Repository navigation
Releases
Releases · MasterKPG/rust-glass
v0.3.0
Added
Gauge::thickness,Gauge::label_sizeandGauge::label_padding. The label of a gauge shrinks until it fits inside the ring with the padding to spare, so a word like "Battery" no longer touches it.ProgressBar::tracksets the color of the unfilled part.- Drag sources lift onto their glass plate as soon as they are pressed, follow the pointer into the drag without a jump, and settle back into place when let go.
Vec2::abs.- Pages of the showcase come into focus as they appear, using
Painter::blur. Context::morphmoves an element from the view that showed it to the view that shows it now. In the showcase, album covers grow from the grid into a detail view and back.- Scroll areas scroll to show a widget that gets focus from the keyboard or a screen reader.
- The items of a reorderable list move apart to make room for the dragged item, where a line used to mark the spot.
Painter::blurblurs what is already painted in a rectangle, andMaterial::bluris the glass behind it.- Menus, popups, alerts and sheets bring their content into focus as they form, instead of only fading it in.
- A mask added while another is active is combined with it. A segmented control or tab bar inside a scroll area now fades at its edge like everything else.
Context::remove_imagefrees an image.- API docs for every public item. Pushes to dev fail when the docs have warnings.
Fixed
- A collapsing section no longer stalls one spacing short of closed and then jumps shut. Opening starts without a jump too.
- Menus, combo boxes and context menus fade out together with their shape. The glass no longer lingers over the button at a third of its strength and vanishes at the end, and a context menu no longer leaves a dot behind.
- The blur that brings popups, alerts and sheets into focus fades with them, instead of outlasting them and disappearing at once.
- Button labels no longer shake when a press is released. The release settles without a wobble, labels never shrink below their size at rest, and scaled text lands on the same pixel it rests on.
- An element that morphs between views follows its target when the target moves, settles as soon as it is in place, and the album cover's shadow sinks back as it lands.
Changed
- The guide describes how drag sources lift on press and how a morph follows a target that moves. The README lists morphs and content blur, and points to the planned egui integration.
- The progress bar is a flat capsule in one color, 6 points high, without a gradient or gloss.
- The album view of the showcase opens faster, and morphs travel on slightly quicker springs.
- New preview pictures and clips of the rebuilt showcase, including the album view and the Lists page. The preview run writes the crop of each clip next to its frames.
- Breaking: each widget has its own module, such as
widgets::menu,widgets::dialogandwidgets::toggle. The oldbars,controls,overlay,gelanddndmodules are gone. The prelude still exports every widget. - Breaking:
Checkbox,Radio,ProgressBar,Gauge,Spinner,Image,Collapsing,ColorPicker,Stepper,SplitButton,TabBarandComboBoxare created withnewand builder methods instead of struct literals.Rowis nowSettingsRow. - Breaking: renamed modules
animtoanimation,geomtogeometry,accesstoaccessibilityandiconstoicon. - Breaking: renamed
Spring::xandSpring::vtovalueandvelocity,Spring::attoSpring::new,Spring2toSpring2d,Context::animate2toanimate_vec2andContext::tunetotuning. - Breaking: renamed
Context::ppptopixels_per_point,Context::hosttohost_commands,HostCmdtoHostCommand,Context::copytocopy_text,Context::adapttobackdropand its resultAdaptedtoBackdrop. - Breaking: renamed
Ui::maxtomax_rect,Ui::alloctoallocate,Ui::alloc_interacttoallocate_response,Ui::text_withtostyled_textandResponse::tiptoon_hover_text. - Breaking: renamed
Theme::frosttoglass_tint,Material::froststoglass_tint_response,Material::chromatodispersion,Material::bleedtolight_spill,Glass::littobrightness,Corner::RoundtoCorner::CircularandTuning::GELtoTuning::PRESS. Theknobandtrackcolor setters of sliders and segmented controls are nowthumb_colorandtrack_color. - Breaking: the colors of
Surfaceend in_color(text_color,secondary_color,fill_color,strong_fill_colorand so on), andSurface::darkisdarkness.Theme::textandTheme::backgroundaretext_colorandbackground_color. - Breaking: renamed
Theme::body,captionandtitletobody_size,caption_sizeandtitle_size, andTheme::high_contrasttoincrease_contrast. - Breaking: renamed
Context::cleartoclear_color,Context::imetoime_area,Input::secondarytosecondary_clicked,Input::doubletodouble_clicked,Cursor::ResizeHtoResizeHorizontalandPressEffect::presstoamount. - Breaking:
FrameStats::gpu_msis anOption. It isNonewhere the GPU cannot measure time, such as the virtual machines of the macOS runners. - Parameters of public functions have full names, such as
rectandcolorinstead ofrandc. - Shorter README and roadmap. The guide uses the new names and says which screen readers have been tried. Its examples compile again after the renames.
- Breaking:
Panel::flipsis nowPanel::adaptive. sectiondraws its title inside the card, so it stays readable over any wallpaper. Cards are a little more opaque.- The showcase puts every group of widgets on a card with a title and a one line explanation, labels every control, and draws page titles on a soft shade. Debug timings moved from the sidebar to the Material Lab, and the Reference page left the showcase (the
referencebinary still replays the reference gestures). - Breaking: the renderer, draw lists and glyph atlas are no longer public.
Context::centeris removed, usectx.screen.center().
v0.2.0
Added
- Accessibility through AccessKit. Screen readers see every built in widget with its role, name, value and state, and can press buttons, flip switches, move sliders and steppers, pick tabs and segments and set the text of fields. The tree is built only while a screen reader listens.
Ui::accessdescribes your own widgets andContext::access_labelnames controls without text. - Rows of a settings list give their title to the switch, slider or stepper at their end.
- Horizontal scrolling with
ScrollArea::horizontal()and scrolling on both axes withScrollArea::both(). The wheel goes to the innermost area that scrolls on its axis, so a row of cards inside a page leaves vertical scrolling to the page. Shift turns the wheel sideways. ScrollArea::show_rowslays out only the visible rows of a long list. A hundred thousand rows cost as much as ten.ScrollArea::fade_sides,width,content_width, andscroll_offsetandset_scroll_offsetto save and restore a position.- Drag and drop:
Ui::drag_sourcelifts its content onto a glass plate that follows the pointer,Ui::drop_zoneaccepts payloads of one type and lights up under them,Ui::reorderreorders a list by dragging. Escape cancels a drag. - Undo and redo in text fields with Ctrl+Z, Ctrl+Shift+Z and Ctrl+Y (Command on macOS). Typing undoes a word at a time.
- Input method composition shows underlined at the caret, and the candidate window opens next to it.
Ui::scopeandUi::scope_idlay out a group of widgets as one,Ui::reservesets a minimum size.- Lists & Drag page in the showcase.
- Tests and headless renders on macOS and Linux for every push to dev.
Changed
- The input method is enabled only while a text field has focus.
Context::scroll_arearoutes wheel input per axis.Context::scroll_area_axestakes the axes an area scrolls on.
v0.1.1
Changed
- Development moved to the dev branch. Merging it into main makes a release.
v0.1.0
First public release.
Added
- Guide on how to build an app, also part of the API docs. Its examples are compiled by the tests.
- License: MIT or Apache-2.0, at your option.
- Published on crates.io. Later versions are released from pushes to main.
- Glass material with refraction, dispersion, variable blur, adaptive tint, rim light, inner glow and color carrying shadow. Presets: regular, clear, thick, lens.
- Renderer on wgpu where glass refracts everything drawn below it, including other glass.
- Immediate mode layout, input routing with layers, keyboard focus and spring animation.
- Components: buttons, slider, switch, segmented control, tab bar, text fields, menus, pickers, progress, toasts, alerts, sheets, windows, scroll area and more.
- Settings for frost, light and dark, reduced transparency, reduced motion and increased contrast.
- Showcase app with a live material editor, and headless capture with timings.
- Preview folder with pictures and three clips (tab bar, slider, + button), rendered with
--preview. - Tab bar selection lifts into a clear blob that stands proud of the bar, with rainbow caps. It gets milkier towards the tinted end of the transparency setting.
- Windows open centered and fit the monitor.
- Image mipmaps, so scaled down pictures stay smooth.
Changed
- The light spot under the pointer is gone and the virtual light no longer follows the mouse. A press only brightens the surface evenly and slightly.
- Edges, rims and masks use a wider anti-aliasing profile, the strongly bent zone at the rim is supersampled, and resting controls sit on whole pixels.
- Thumbs change shape with acceleration instead of speed, fitted to the reference footage. Slider, switch and segment thumbs keep their area.
- The default transparency sits between ultra clear and tinted.
- Showcase pages form with a short transition.
- The tab bar blob is wider and flatter (104 by 72.4 points), squeezes as a whole with squarer shoulders, and follows a softer spring. Size, outline and motion are fitted to the reference clip.
- The caps of the blob taper along its corners and carry rainbows only there. The labels under it bend in a pass of their own.
Fixed
- Sliders, switches and segmented controls stay in place while their window is dragged.
- The drops of a split button separate completely once open.
- Menus stay attached to a button that scrolls or moves.
- Springs no longer jump the last fraction of a point when they settle.