Skip to content

v0.22.0

Choose a tag to compare

@github-actions github-actions released this 28 Sep 11:59
· 383 commits to main since this release

What's Changed

v0.22.0 introduces retained mode. MewUI is working toward 1.0 in January 2027 and targets environments that draw straight to a framebuffer as well as low-end devices, where an immediate mode that redraws the whole window every frame is not affordable.

In retained mode a window redraws only what actually changed. Before, a single change redrew the entire window, and where that cost hurt, the application had to set BitmapCache on CacheMode and pick what to cache by hand. Now the framework decides. A frame in which nothing changed is not drawn at all, and BitmapCache settings added for scrolling or animation can be removed.

The core also gains the MarkupTextBlock control, which shows formatted text written as markup, and BaselineOffset, which moves a text run above or below the baseline. As screens that show Markdown documents have become common, a new extension package displays Markdown documents as well.

Added

Rendering

  • Retained mode - A window records what each element drew and repaints only the elements whose content, position, or state changed. When nothing changed, the screen update is skipped, and elements outside the view are recorded when they become visible again. There is nothing to turn on; it applies to every window on every backend.
    Aprillz MewUI Gallery_Ruc9vKwqLl

Shapes and Geometry

  • Basic shape geometries - Rectangles, ellipses, and lines can be expressed as geometries without building paths by hand, and several can be grouped into one. All geometries now share the Geometry type, so they can be passed straight to the operations of the Aprillz.MewUI.Geometry extension.
  • Shapes hit by their actual outline - Shapes that do not fill their bounding box, such as circles or diagonal lines, used to be clickable in their empty corners too. With precise hit testing turned on through the Aprillz.MewUI.Geometry extension, only the painted fill or stroke is clickable.

Images

  • SVG icons straight from the core - Simple SVGs such as icons can be shown as images without an extra extension (SimpleSvgSource). Advanced features such as filters and text are skipped, and a tint can recolor the icon. Applications that do not use it do not carry it.

Text

  • Formatted text written as markup - A single string with inline tags such as <b>, <i>, and <font> shows text that mixes bold, italic, underline, color, superscript / subscript, and code spans (MarkupTextBlock). Malformed tags are shown as literal text.
    image
  • Baseline shift - Part of a text can be moved above or below the baseline while keeping its font size (BaselineOffset). The line grows by the shift so it does not overlap the lines above or below, and markup superscripts and subscripts are drawn with it.
  • DirectWrite text on Windows - The GDI and MewVG Win32 backends draw text with DirectWrite. Intermediate weights such as Segoe UI Medium, color emoji, and rotated or scaled text are drawn correctly. When these are not needed, setting the MewUIWin32TextEngine build property to Gdi turns it off and makes a NativeAOT executable about 55 to 100 KB smaller.
    image
  • Always-visible vertical scroll bar - A multi-line text box can keep its vertical scroll bar visible even when the document is short. The scroll bar is then disabled, and the mouse wheel goes to the outer scroll area.

Items Controls

  • Per-item container changes no longer leak to other items - When the container preparation hook changes the background or padding for one item only, the container returns to its original values when it is reused for another item.

Developer Tools

  • Convert a whole file to chained calls at once - The code fix that turns property assignments into chained calls can be applied to an entire file with Fix All (MEW1105, MEW1106). Event subscriptions and attached property setters are converted as well.
  • Dirty region overlay - Primary+Shift+D colors the areas repainted in the last frame, so unnecessary repaints are easy to spot.
  • AOT compatibility marking (#262) - MewUI packages are marked NativeAOT compatible, so enabling the AOT compatibility check for referenced assemblies in an application no longer warns about MewUI.

Improved

Rendering

  • Window clearing on MewVG - The MewVG backends on Win32 and X11 clear a window or a region to repaint with the GPU's clear command instead of filling the whole region. On a Raspberry Pi 4 the GPU time to clear a window dropped from about 15 ms to 2 ms.
  • MewVG 0.10.0 - The MewVG backends that use OpenGL draw with a shader that contains only what the fill needs, whether solid, gradient, or image. On a Raspberry Pi 4 the GPU time of a window-sized solid fill dropped from 15.6 ms to 6.2 ms and an image fill from 15.7 ms to 7.6 ms, with identical output pixels.
  • Translucent elements composited as one layer - Like Direct2D, the GDI and MewVG backends now composite an element with Opacity below 1 together with its subtree in one pass, so overlapping children no longer show through each other. Text inside it is drawn with grayscale antialiasing instead of ClearType.

Menus

  • Menus that grow to the available space - Context menus and drop-down button menus are no longer cut at 320 DIP and grow to the available screen space. When space runs short, they open on the other side or scroll within the larger side. A height limit can still be set explicitly.

Items Controls

  • Rows that survive a full refresh stay as they are - After a Reset that clears and refills the collection, items that remain keep their existing rows and are not redrawn. Items are matched by the key given to the items view.

Fixed

  • Transparent windows and popups rendered black on Linux (#258) - The attribute list used to choose the GLX configuration contained invalid entries, so drivers that check the list strictly returned no configuration with alpha and the window fell back to an opaque surface.
  • Changing Placeholder had no effect (#260) - TextBox and MultiLineTextBox kept drawing the first text instead of the new one, and the width of an empty TextBox or ComboBox did not follow the new text.
  • Mouse input stopped after releasing a button outside the control (#256) - The pressed control kept the capture, so the next click did not reach other controls. The capture is now released when the button is released with the pointer outside, when the window is deactivated, or when a modal dialog opens.
  • Pressed state and click out of sync when the pointer left and came back (#256) - The pressed look is released when the pointer leaves, and releasing after coming back completes the click or toggle. ToggleSwitch no longer toggles on a release outside.
  • First click on a button with a tooltip was ignored (#253) - Closing the tooltip window released the mouse capture for the whole thread, including the capture the button had just taken. The capture is now released only from the window that holds it.
  • Tooltips opened for elements passed during a drag (#259) - While a left or right button is held, tooltips do not open; they open when the pointer enters again after the button is released.
  • Drags continued after the capture was lost (#259) - The SplitPanel splitter, Slider, and the color picker popup start a drag only when capture succeeds and stop when the capture is lost.
  • Owner window covered a modal dialog that has a taskbar button - A dialog with ShowInTaskbar set to true had no owner attached, so on Win32 and macOS the disabled owner window could cover it.
  • Glyph strokes clipped at the text box edge - Strokes extending past the text area, such as the end of an italic glyph or a descender touching the bottom edge, were cut off.
  • Text in tall lines shifted down when selected or colored - In text with a large line height, selecting part of it or applying a color made the glyphs appear pushed down.
  • Items stayed out of place in lists with varying item heights - Items were not arranged again after the scroll position was corrected, so they stayed at their old positions until the next input.
  • Control-drawn text blurrier than TextBlock - Captions of menu items, the ComboBox header, DatePicker, and buttons were drawn at fractional pixel positions and looked blurry on Direct2D. With pixel snapping on, the text position is now aligned to device pixels.
  • Linear gradients drawn wrong on the GDI backend - Setting GradientTransform turned the gradient in the wrong direction, and SpreadMethod.Pad gradients mirrored their colors beyond the end points.
  • Text backgrounds shifted and last words clipped in the browser - In desktop Firefox, the sum of per-character widths was about 4% smaller than the rendered word, so span backgrounds shifted and the last word of a line was clipped. Text is now measured per word.
  • Inertial scrolling stuttered or stopped early in the browser - Inertial scrolling ended on a 60 Hz assumption, so the final stretch looked wrong on 120 Hz or 30 Hz displays. It now ends according to the actual frame interval.
  • Document length and scroll bar jumped while scrolling a MultiLineTextBox - The height of unmeasured lines was estimated from the font size, so the length changed each time a real line was measured. The estimate now comes from the measured heights of lines already laid out.
  • Text controls kept drawing with the old font after the parent font changed - MultiLineTextBox, SyntaxViewer, and single-line text controls kept the line layout of the previous font after the inherited font changed.
  • Content of a control disabled by a command stayed enabled - Turning a CommandSourceControl off and on through command state left its content's enabled state unchanged.
  • Icons of disabled toolbar items did not dim - Disabling an item with an icon and text dimmed only the text and left the image icon as it was.
  • Higher-priority work waited behind queued lower-priority work - Higher-priority work posted while lower-priority work was being processed waited behind the rest of the lower-priority queue.
  • Linux theme watcher process left behind after a forced exit - After the app was killed, the gsettings monitor process kept running, using CPU and holding the decoder and GPU handles it inherited from the app.
  • GPU memory not freed when releasing continuously updated bitmaps on Linux - The MewVG X11 backend did not release the GPU texture of IsStreaming pixel buffers, so on a Raspberry Pi about 13 MB remained each time a CPU-decoded video was closed.
  • Rotated rectangle fills drawn with jagged edges on MewVG - Calling FillRectangle after applying a rotation in OnRender filled without antialiasing, leaving stair-stepped edges.

Extension Packages

Aprillz.MewUI.Markdown

  • Markdown viewer - A new package that displays Markdown documents in MewUI. It draws paragraphs, lists, tables, code blocks, quotes, and images.
    647756983-79b07888-54fb-4504-971a-d932dc68c899

  • Selection and link navigation - Text can be selected across blocks and copied, and a right-click menu is provided by default. Tab moves between links.

  • Footnotes and HTML formatting - Footnotes are shown with numbers and back links. With the option on, simple HTML tags such as bold and color are applied as formatting.

  • Long documents and customization - Long documents open quickly by building only the visible part, and the reading position is kept when the content changes. Specific Markdown elements can be drawn with custom controls, and parsing can run in the background.

Aprillz.MewUI.Geometry

  • Geometry operations (#196) - A new package that adds boolean operations such as union, intersection, and difference, along with area, exact bounds, and point containment tests. Turning it on also makes shapes hit-test by their actual outline.
    image

Aprillz.MewUI.MewCharts

  • Charts drew outside their area - ChartViewBase now clips its drawing to its own bounds.

Aprillz.MewUI.MewDock

  • Bindable dock panes - Pane titles can be bound, and state changes such as the active pane or maximization raise notifications. Pane content is no longer recreated when the layout changes, and closing a pane can be canceled before it happens.
  • Resize cursor on splitters - Hovering a splitter shows the resize cursor for its direction.
  • Tab headers drawn twice - Tab titles, custom headers, and close icons of FlexTabButton and FlexBorderButton were drawn on top of each other.
  • Newly added panes stayed empty - Panes added with AddDocumentPane and DockGroup.AddPane showed an empty tab until the next tab switch.

Aprillz.MewUI.MewvalonEdit

  • Always-visible vertical scroll bar - The editor can also keep its vertical scroll bar visible when the document is short, and the scroll bar then does not cover the text.
  • Overlays on the editor - Applications can open and close overlays that float elements over the editor.
  • Line numbers for pinned lines - When an editor line is shown away from its own row, such as a line pinned at the top while scrolling, a line number matching the line number margin can be drawn beside it.
  • PositionChanged raised when the caret did not move - Like AvalonEdit, it is now raised only when the caret actually moves.
  • Undoing Enter left the automatic indentation behind - The line break and its indentation now undo together in a single step.
  • TextCommitted and EditableRegions lost when the document was replaced - A document swapped in with ReplaceDocument did not get the existing TextCommitted handlers and EditableRegions.

Docs / Samples

Gallery / Samples

  • Baseline shift example - The Gallery shows BaselineOffset and sub / sup rendering.
  • Markdown sample - Shows switching between GFM and HTML formatting, footnotes, and selection and copy, and runs on every backend on all three platforms.
  • Gallery reorganization - Pages are grouped under Input, Text, Collections, Layout, and similar sections. The DevTools page lists the shortcuts for the inspector, performance monitor, profiler, and dirty region overlay.
  • Browser Gallery - A loading screen appears while it opens, and the tab icon is now the SVG logo.
  • Task Manager sample - Shows per-platform process memory, a process tree that becomes a flat list when sorted, disk / network / GPU performance pages, and running and ending tasks. --vg runs it on the MewVG backend.

Docs

  • Command system docs - Rewritten around scope, target, argument, and data. Covers ICommandArgumentSource, CommandData, and ContextMenu placement, and replaces the ShowAt example that is no longer used.
  • Items and templates docs - Adds PrepareContainer / ClearContainer, how reused containers revert values written by hooks, and when hooks run.
  • Working examples - The minimal examples in the README and lifecycle docs register a platform host and a backend. The old examples threw on the first text measurement when copied as is.
  • macOS and browser in the lifecycle docs - Fills in macOS registration, and documents that RunAsync is the browser entry point, that there is a single top-level window, and that only ShowDialogAsync is used.
  • Outdated names removed - Removed old names such as the Aprillz.MewUI.Backends and Aprillz.MewUI.PlatformHosts usings, OpenGLWin32Backend, and .UseOpenGL() from the docs.
  • Custom control docs - Rewritten for the current API.
  • Retained frame explanation - The rendering docs describe how frames are kept and what gets repainted.
  • Build switch docs - Build properties and feature switches are collected in one place.

Video Sample

  • Zero-copy video on Intel / NVIDIA GPUs (#263) - Zero-copy video presentation works on both GPUs, and clicking the video plays or pauses it and switches to full screen.
  • Playback stalled after the queue filled - With the playback queue full, no redraw was requested when the next frame was due, so playback stopped.
  • Pixel buffers allocated for frames not on the CPU path - Frames on the zero-copy path also allocated a 33 MB buffer each time at 4K.
  • Sample crashed when software-decoding some videos - sws_scale wrote a few bytes past the end of the frame buffer and corrupted the heap.

Breaking Changes

Rendering

  • UIElement.InvalidateVisual behaves differently - Previously it called InvalidateVisual on each ancestor in turn; now it asks the window to redraw only that element. Code that intercepted child changes by overriding InvalidateVisual on an ancestor must move to another notification path.
  • Repaint scope of InvalidateMeasure / InvalidateArrange changed - Previously all ancestors were repainted; now only the requesting element and elements whose layout result changed are repainted. Code that expected an ancestor area to repaint must call InvalidateVisual on that area directly.
  • Types overriding RenderSubtree are recorded with their subtree - The drawn result is the same, but when any descendant changes, the whole subtree is recorded and repainted again. Types outside the package cannot split this unit further.

Items Controls

  • GridViewRow changed from Panel to Control - Panel members such as Children, Add, Remove, and Clear, along with ClipToBounds, are gone, and Padding is now Control.PaddingProperty. Code that handled cells in a row through Children must be updated.
  • Selection and hover backgrounds span the whole row - Selection, hover, and alternating row backgrounds cover the entire row, and indentation and the expander button in TreeView are part of the same row. Applications that drew the same background inside item templates must remove it from the template.
  • Default TreeView row height changed - The default changed from max(BaseControlHeight, 24) to max(18, BaseControlHeight - 2), matching ListBox, so rows go from 28 to 26 in the default theme. Setting TreeView.ItemHeight explicitly is unaffected.
  • Reused containers revert every value written by hooks - Previously only seven fixed properties were reset, so other values written by a hook carried over to the next item. Now every MewProperty changed by the hook is reverted, so code that relied on values carrying over must move them to a style.

Menus

  • Default menu height limit removed - The defaults of ContextMenu.MaxMenuHeight, DropDownButton.MaxDropDownHeight, and SplitButton.MaxDropDownHeight changed from 320 to double.PositiveInfinity. Set it explicitly if the 320 DIP limit is needed.

Windows Text

  • Default text engine on the Win32 backends is now DirectWrite - The GDI and MewVG Win32 backends draw text with DirectWrite, which changes font resolution, glyph shapes, and text measurements. Set MewUIWin32TextEngine to Gdi to restore the previous behavior.

변경 사항

v0.22.0은 리테인드 모드를 도입한 릴리즈입니다. MewUI는 2027년 1월 1.0을 목표로 프레임버퍼로 직접 그리는 환경과 저사양 기기까지 바라보고 있는데, 이런 곳에서는 창 전체를 매 프레임 다시 그리는 즉시 모드를 감당할 수 없습니다.

리테인드 모드에서 창은 실제로 달라진 곳만 다시 그립니다. 예전에는 무엇 하나만 바뀌어도 창을 통째로 다시 그렸고, 그 비용이 부담스러운 곳은 애플리케이션이 CacheMode에 BitmapCache를 지정해 어디를 캐시할지 직접 골라야 했습니다. 이제는 프레임워크가 판단합니다. 아무것도 바뀌지 않은 프레임은 아예 그리지 않고, 스크롤이나 애니메이션 때문에 지정해 두었던 BitmapCache는 지워도 됩니다.

그 밖에 서식 있는 텍스트를 마크업으로 표시하는 MarkupTextBlock 컨트롤과 텍스트 런을 기준선 위아래로 옮기는 BaselineOffset이 코어에 추가되었습니다. Markdown 문서를 보여 주는 화면이 흔해진 만큼, Markdown 문서를 표시하는 확장 패키지도 추가되었습니다.

추가됨

렌더링

  • 리테인드 모드 - 창은 요소마다 그린 내용을 기록해 두고, 내용이나 위치, 상태가 달라진 요소만 다시 칠합니다. 달라진 것이 없으면 화면 갱신을 건너뛰고, 화면 밖 요소는 다시 보일 때 기록합니다. 따로 켜는 설정 없이 모든 백엔드의 모든 창에 적용됩니다.

도형과 지오메트리

  • 기본 도형 지오메트리 - 사각형, 타원, 선을 경로를 직접 만들지 않고 지오메트리로 표현하고, 여러 개를 하나로 묶을 수 있습니다. 모든 지오메트리가 공통 Geometry 타입이 되어, Aprillz.MewUI.Geometry 확장의 연산에 그대로 넘길 수 있습니다.
  • 모양대로 클릭되는 도형 - 원이나 대각선처럼 경계 상자를 다 채우지 않는 도형도 빈 모서리까지 클릭되었습니다. Aprillz.MewUI.Geometry 확장으로 정밀 판정을 켜면, 도형이 실제로 칠하거나 그은 부분만 클릭됩니다.

이미지

  • 코어에서 바로 쓰는 SVG 아이콘 - 별도 확장 없이 아이콘 같은 단순한 SVG를 이미지로 표시할 수 있습니다(SimpleSvgSource). 필터나 텍스트 같은 고급 기능은 건너뛰고, 틴트로 아이콘 색을 바꿀 수 있습니다. 쓰지 않는 애플리케이션에는 포함되지 않습니다.

텍스트

  • 마크업으로 쓰는 서식 있는 텍스트 - <b>, <i>, <font> 같은 인라인 태그를 넣은 문자열 하나로 굵게, 기울임, 밑줄, 색, 위 / 아래 첨자, 코드 구간이 섞인 텍스트를 표시합니다(MarkupTextBlock). 잘못된 태그는 글자 그대로 보입니다.
  • 기준선 이동 - 글꼴 크기는 그대로 두고 텍스트 일부를 기준선 위아래로 옮길 수 있습니다(BaselineOffset). 옮긴 만큼 줄 높이가 늘어나 윗줄이나 아랫줄과 겹치지 않으며, 마크업의 위 / 아래 첨자도 이 기능으로 그립니다.
  • Windows의 DirectWrite 텍스트 - GDI와 MewVG Win32 백엔드가 DirectWrite로 글자를 그립니다. Segoe UI Medium 같은 중간 굵기, 컬러 이모지, 회전하거나 확대한 글자를 제대로 그립니다. 이런 기능이 필요 없으면 빌드 속성 MewUIWin32TextEngine을 Gdi로 지정해 끌 수 있고, NativeAOT 실행 파일이 약 55~100 KB 작아집니다.
  • 항상 보이는 세로 스크롤바 - 여러 줄 텍스트 상자에서 문서가 짧아도 세로 스크롤바를 계속 보이게 할 수 있습니다. 이때 스크롤바는 비활성이고, 마우스 휠은 바깥 스크롤 영역으로 전달됩니다.

항목 컨트롤

  • 항목별로 꾸민 컨테이너가 다른 항목으로 번지지 않음 - 컨테이너 준비 훅에서 한 항목에만 배경이나 여백을 바꿔도, 그 컨테이너가 다른 항목에 재사용될 때 원래 값으로 돌아갑니다.

개발 도구

  • 파일 전체를 체인 호출로 한 번에 변환 - 속성 대입문을 체인 호출로 바꾸는 코드 수정을 Fix All로 파일 전체에 적용할 수 있습니다(MEW1105, MEW1106). 이벤트 구독과 첨부 속성 설정도 함께 바꿉니다.
  • 더티 영역 오버레이 - Primary+Shift+D를 누르면 직전 프레임에서 다시 칠한 영역이 색으로 표시되어, 어디가 불필요하게 다시 그려지는지 확인할 수 있습니다.
  • AOT 호환 표시 (#262) - MewUI 패키지가 NativeAOT 호환으로 표시되어, 애플리케이션에서 참조 어셈블리의 AOT 호환성 검사를 켜도 MewUI에 대한 경고가 나오지 않습니다.

개선됨

렌더링

  • MewVG의 창 지우기 - Win32와 X11의 MewVG 백엔드가 창이나 다시 칠할 영역을 지울 때, 그 영역 전체를 채우는 대신 GPU의 지우기 명령을 씁니다. Raspberry Pi 4에서 창 한 번 지우는 GPU 시간이 약 15 ms에서 2 ms로 줄었습니다.
  • MewVG 0.10.0 적용 - OpenGL을 쓰는 MewVG 백엔드가 단색, 그래디언트, 이미지처럼 채우는 방식에 맞춰 필요한 기능만 담은 셰이더를 골라 그립니다. Raspberry Pi 4에서 창 크기 단색 채우기의 GPU 시간이 15.6 ms에서 6.2 ms로, 이미지 채우기는 15.7 ms에서 7.6 ms로 줄었고 결과 픽셀은 같습니다.
  • 반투명 요소를 한 덩어리로 합성 - GDI와 MewVG 백엔드도 Direct2D처럼 Opacity가 1보다 작은 요소를 하위 트리째 한 번에 합성해, 겹친 자식끼리 비쳐 보이지 않습니다. 대신 그 안의 글자는 ClearType이 아닌 회색조 안티에일리어싱으로 나옵니다.

메뉴

  • 화면 공간만큼 늘어나는 메뉴 - 컨텍스트 메뉴와 드롭다운 버튼의 메뉴가 320 DIP에서 잘리지 않고 화면 공간만큼 길어집니다. 공간이 모자라면 반대쪽으로 열거나 넓은 쪽에 맞춰 스크롤합니다. 높이 상한이 필요하면 직접 지정할 수 있습니다.

항목 컨트롤

  • 목록을 통째로 갱신해도 남은 행은 그대로 - 컬렉션을 비우고 다시 채우는 Reset 뒤에도 계속 남아 있는 항목은 기존 행을 그대로 써서 다시 그려지지 않습니다. 같은 항목인지는 항목 뷰에 준 키로 판단합니다.

수정됨

  • Linux에서 투명 창과 팝업이 검게 나오던 문제 (#258) - GLX 설정을 고르는 속성 목록에 잘못된 항목이 들어 있어, 목록을 엄격하게 검사하는 드라이버에서는 알파가 있는 설정을 얻지 못하고 불투명 화면으로 떨어졌습니다.
  • Placeholder를 바꿔도 반영되지 않던 문제 (#260) - TextBox와 MultiLineTextBox가 바뀐 문구 대신 첫 문구를 계속 그렸고, 비어 있는 TextBox와 ComboBox의 너비도 새 문구에 맞춰지지 않았습니다.
  • 컨트롤 밖에서 버튼을 떼면 마우스 입력이 멈추던 문제 (#256) - 누른 컨트롤이 캡처를 놓지 않아 다음 클릭이 다른 컨트롤에 닿지 않았습니다. 이제 포인터가 벗어난 채 버튼을 떼거나, 창이 비활성화되거나, 모달 대화 상자가 열리면 캡처가 해제됩니다.
  • 버튼을 누른 채 포인터가 나갔다 돌아오면 눌린 모양과 클릭이 어긋나던 문제 (#256) - 포인터가 나가면 눌린 모양이 풀리고, 돌아와서 떼면 클릭과 토글이 확정됩니다. ToggleSwitch는 바깥에서 뗀 클릭에 더 이상 토글되지 않습니다.
  • 툴팁이 떠 있는 버튼의 첫 클릭이 무시되던 문제 (#253) - 툴팁 창이 닫히면서 스레드 전체의 마우스 캡처를 해제해, 버튼이 방금 잡은 캡처까지 풀렸습니다. 이제 캡처를 가진 창에서만 해제합니다.
  • 드래그 중에 지나친 요소의 툴팁이 뜨던 문제 (#259) - 왼쪽이든 오른쪽이든 버튼이 눌려 있는 동안에는 툴팁이 열리지 않고, 버튼을 뗀 뒤 다시 들어갈 때 열립니다.
  • 캡처를 잃어도 드래그가 계속되던 문제 (#259) - SplitPanel의 스플리터와 Slider, 색 선택 팝업은 캡처에 성공했을 때만 드래그를 시작하고 캡처를 잃으면 멈춥니다.
  • 작업 표시줄 단추가 있는 모달 대화 상자를 소유자가 덮던 문제 - ShowInTaskbar가 true인 대화 상자에는 소유자가 연결되지 않아, Win32와 macOS에서 비활성화된 소유자 창이 대화 상자를 덮을 수 있었습니다.
  • 글자 획이 상자 경계에서 잘리던 문제 - 기울임꼴 글자의 끝이나 아래 경계에 닿는 디센더처럼 텍스트 영역을 벗어나는 획이 잘려 나갔습니다.
  • 줄 높이가 큰 텍스트에 선택이나 색을 입히면 글자가 내려앉던 문제 - 줄 높이를 크게 준 텍스트에서 일부를 선택하거나 색을 입히면 글자가 아래로 밀려 보였습니다.
  • 항목 높이가 제각각인 목록에서 항목이 어긋난 자리에 머물던 문제 - 스크롤 위치를 보정한 뒤 항목을 다시 배치하지 않아, 다음 입력이 올 때까지 보정 전 위치에 그대로 있었습니다.
  • 컨트롤이 직접 그리는 글자가 TextBlock보다 흐릿하던 문제 - 메뉴 항목, ComboBox 헤더, DatePicker, 버튼의 캡션이 소수점 픽셀 위치에 그려져 Direct2D에서 흐렸습니다. 이제 픽셀 맞춤이 켜져 있으면 글자 위치를 화면 픽셀에 맞춥니다.
  • GDI 백엔드에서 선형 그래디언트가 어긋나게 그려지던 문제 - GradientTransform을 지정하면 그래디언트 방향이 틀어졌고, SpreadMethod.Pad 그래디언트는 끝점 너머에서 색이 거울처럼 반복됐습니다.
  • 브라우저에서 글자 배경이 밀리고 줄 끝 단어가 잘리던 문제 - 데스크톱 Firefox에서는 글자를 하나씩 잰 너비의 합이 실제 단어보다 약 4% 작아, 구간 배경이 밀리고 줄 끝 단어가 잘렸습니다. 이제 단어 단위로 잽니다.
  • 브라우저에서 관성 스크롤의 끝부분이 끊기거나 일찍 멈추던 문제 - 관성 스크롤을 60Hz 기준으로 끝내서 120Hz나 30Hz 화면에서 마지막 구간이 어색했습니다. 이제 실제 프레임 간격에 맞춰 끝냅니다.
  • MultiLineTextBox를 스크롤할 때 문서 길이와 스크롤바가 흔들리던 문제 - 측정하지 않은 줄의 높이를 글꼴 크기로 어림잡아 실제 줄을 잴 때마다 길이가 바뀌었습니다. 이제 이미 잰 줄들의 실제 높이로 추정합니다.
  • 부모 글꼴이 바뀌어도 텍스트 컨트롤이 옛 글꼴로 그리던 문제 - MultiLineTextBox, SyntaxViewer, 한 줄 텍스트 컨트롤이 상속된 글꼴이 바뀌어도 이전 글꼴의 줄 배치를 계속 썼습니다.
  • 명령으로 비활성화한 컨트롤의 콘텐츠가 활성 상태로 남던 문제 - 명령 상태로 CommandSourceControl을 껐다 켜도 그 콘텐츠의 활성 상태는 이전 값 그대로였습니다.
  • 비활성화된 툴바 항목의 아이콘이 흐려지지 않던 문제 - 아이콘과 글자가 있는 항목을 비활성화하면 글자만 흐려지고 이미지 아이콘은 그대로였습니다.
  • 높은 우선순위 작업이 먼저 쌓인 낮은 우선순위 작업 뒤로 밀리던 문제 - 낮은 우선순위 작업을 처리하는 동안 들어온 높은 우선순위 작업이 큐에 남은 낮은 우선순위 작업 뒤에서 기다렸습니다.
  • 강제 종료한 뒤에도 Linux 테마 감지 프로세스가 남던 문제 - 앱을 강제 종료해도 gsettings monitor 프로세스가 남아 CPU를 쓰며 앱에서 상속받은 디코더와 GPU 핸들을 붙잡고 있었습니다.
  • Linux에서 계속 갱신되는 비트맵을 해제해도 GPU 메모리가 남던 문제 - MewVG X11 백엔드가 IsStreaming 픽셀 버퍼의 GPU 텍스처를 제대로 해제하지 못해, Raspberry Pi에서는 CPU로 디코딩한 영상을 하나 닫을 때마다 약 13 MB가 남았습니다.
  • 직접 그리기에서 회전한 사각형 채우기의 가장자리가 MewVG에서 깨지던 문제 - OnRender에서 회전을 건 뒤 FillRectangle을 부르면 안티에일리어싱 없이 채워 가장자리가 계단처럼 나왔습니다.

확장 패키지

Aprillz.MewUI.Markdown

  • Markdown 뷰어 - Markdown 문서를 MewUI 화면에 표시하는 새 패키지입니다. 문단, 목록, 표, 코드 블록, 인용, 이미지를 그립니다.
  • 선택과 링크 이동 - 여러 블록에 걸쳐 글을 선택해 복사할 수 있고, 오른쪽 클릭 메뉴가 기본으로 붙습니다. Tab으로 링크 사이를 이동합니다.
  • 각주와 HTML 서식 - 각주를 번호와 되돌아가는 링크로 표시합니다. 옵션을 켜면 굵게나 색 같은 간단한 HTML 태그를 서식으로 적용합니다.
  • 긴 문서와 사용자 정의 - 긴 문서는 보이는 부분만 만들어 빠르게 열고, 내용이 바뀌어도 보던 위치를 유지합니다. 특정 Markdown 요소를 직접 만든 컨트롤로 그리거나, 파싱을 백그라운드로 돌릴 수 있습니다.

Aprillz.MewUI.Geometry

  • 지오메트리 연산 (#196) - 도형의 합집합, 교집합, 차집합 같은 불리언 연산과 넓이, 정확한 경계, 점이 안쪽에 있는지 판정하는 기능을 더하는 새 패키지입니다. 켜면 도형의 클릭 판정도 실제 모양대로 바뀝니다.

Aprillz.MewUI.MewCharts

  • 차트가 제 영역 밖으로 그리던 문제 - ChartViewBase가 그리는 내용을 자기 경계 안으로 잘라 그립니다.

Aprillz.MewUI.MewDock

  • 바인딩되는 도킹 패널 - 패널 제목을 바인딩하고, 활성 패널이나 최대화 같은 상태 변화를 알림으로 받을 수 있습니다. 레이아웃이 바뀌어도 패널 내용을 다시 만들지 않으며, 패널이 닫히기 전에 취소할 수 있습니다.
  • 스플리터의 크기 조절 커서 - 스플리터에 마우스를 올리면 나뉜 방향에 맞는 크기 조절 커서가 보입니다.
  • 탭 헤더가 두 번 그려지던 문제 - FlexTabButton과 FlexBorderButton의 탭 제목, 사용자 정의 헤더, 닫기 아이콘이 겹쳐 그려졌습니다.
  • 새로 추가한 패널의 내용이 빈 채로 남던 문제 - AddDocumentPane과 DockGroup.AddPane으로 추가한 패널이 다음 탭 전환 전까지 빈 탭으로 보였습니다.

Aprillz.MewUI.MewvalonEdit

  • 항상 보이는 세로 스크롤바 - 에디터에서도 문서가 짧을 때 세로 스크롤바를 계속 보이게 할 수 있고, 이때 스크롤바가 글자를 가리지 않습니다.
  • 에디터 위 오버레이 - 에디터 위에 원하는 요소를 띄우는 오버레이를 애플리케이션에서 직접 열고 닫을 수 있습니다.
  • 고정된 줄의 줄 번호 그리기 - 스크롤해도 위에 고정해 두는 줄처럼 에디터 줄을 제자리가 아닌 곳에 보여 줄 때, 그 옆에 줄 번호 마진과 같은 모양의 줄 번호를 그릴 수 있습니다.
  • 캐럿이 움직이지 않았는데도 PositionChanged가 발생하던 문제 - 이제 AvalonEdit처럼 캐럿이 실제로 움직였을 때만 발생합니다.
  • Enter의 실행 취소가 자동 들여쓰기를 남겨 두던 문제 - 이제 줄바꿈과 그 들여쓰기가 한 번의 실행 취소로 함께 돌아갑니다.
  • 문서를 바꾸면 TextCommitted와 EditableRegions가 없어지던 문제 - ReplaceDocument로 바꾼 새 문서에 기존 TextCommitted 핸들러와 EditableRegions가 적용되지 않았습니다.

문서 / 샘플

갤러리 / 샘플

  • 기준선 이동 예제 - 갤러리에서 BaselineOffset과 sub / sup 표시를 볼 수 있습니다.
  • Markdown 샘플 - GFM과 HTML 서식 전환, 각주, 선택과 복사를 볼 수 있고, 세 플랫폼의 모든 백엔드로 실행됩니다.
  • 갤러리 재구성 - 페이지를 Input, Text, Collections, Layout 같은 묶음으로 정리했습니다. DevTools 페이지가 인스펙터, 성능 모니터, 프로파일러, 더티 영역 오버레이 단축키를 알려 줍니다.
  • 브라우저 갤러리 - 여는 동안 로딩 화면이 뜨고, 탭 아이콘이 SVG 로고로 바뀌었습니다.
  • 작업 관리자 샘플 - 플랫폼별 프로세스 메모리, 정렬하면 평면 목록으로 바뀌는 프로세스 트리, 디스크 / 네트워크 / GPU 성능 페이지, 작업 실행과 끝내기를 보여 줍니다. --vg로 MewVG 백엔드에서 실행합니다.

문서

  • 명령 시스템 문서 - 범위, 대상, 인수, 데이터를 축으로 다시 썼습니다. ICommandArgumentSource, CommandData, ContextMenu 배치를 다루고, 더 쓰지 않는 ShowAt 예제를 바꿨습니다.
  • 항목과 템플릿 문서 - PrepareContainer / ClearContainer, 재사용되는 컨테이너가 훅이 쓴 값을 되돌리는 방식, 훅이 실행되는 시점을 넣었습니다.
  • 실행되는 예제 - README와 생명 주기 문서의 최소 예제가 플랫폼 호스트와 백엔드를 등록합니다. 예전 예제는 그대로 복사하면 첫 텍스트 측정에서 예외가 났습니다.
  • 생명 주기 문서의 macOS와 브라우저 - macOS 등록 방법을 채우고, 브라우저에서는 RunAsync가 진입점이며 최상위 창은 하나이고 ShowDialogAsync만 쓴다는 점을 적었습니다.
  • 낡은 이름 정리 - 문서에서 Aprillz.MewUI.Backends, Aprillz.MewUI.PlatformHosts using과 OpenGLWin32Backend, .UseOpenGL() 같은 옛 이름을 지웠습니다.
  • 사용자 정의 컨트롤 문서 - 지금 API에 맞춰 다시 썼습니다.
  • 리테인드 프레임 설명 - 렌더링 문서에 프레임이 어떻게 보존되고 무엇이 다시 칠해지는지 적었습니다.
  • 빌드 스위치 문서 - 빌드 속성과 기능 스위치를 한 곳에 모았습니다.

비디오 샘플

  • Intel / NVIDIA GPU 복사 없는 영상 표시 (#263) - 두 GPU 모두에서 복사 없는 영상 표시가 동작하고, 영상을 클릭해 재생·일시 정지하고 전체 화면으로 전환할 수 있습니다.
  • 재생 큐가 꽉 찬 뒤 멈추던 문제 - 재생 큐가 가득 찬 상태에서는 다음 프레임 시각이 되어도 다시 그리기 요청이 오지 않아 재생이 멈췄습니다.
  • CPU 경로가 아닌 프레임까지 픽셀 버퍼를 할당하던 문제 - 복사 없는 경로를 타는 프레임도 매번 4K 기준 33 MB짜리 버퍼를 할당했습니다.
  • 일부 영상을 소프트웨어로 디코딩하면 샘플이 비정상 종료되던 문제 - sws_scale이 프레임 버퍼 끝을 몇 바이트 넘겨 써서 힙이 망가졌습니다.

호환되지 않는 변경 (Breaking Changes)

렌더링

  • UIElement.InvalidateVisual이 하는 일이 달라짐 - 예전에는 상위 요소의 InvalidateVisual을 차례로 불렀지만, 이제는 그 요소만 다시 그리도록 창에 요청합니다. 하위 요소의 변경을 상위 요소의 InvalidateVisual 재정의로 가로채던 코드는 다른 알림 경로로 옮겨야 합니다.
  • InvalidateMeasure / InvalidateArrange가 다시 칠하는 범위가 달라짐 - 예전에는 상위 요소를 모두 다시 칠했지만, 이제는 요청한 요소와 레이아웃 결과가 달라진 요소만 다시 칠합니다. 상위 영역이 다시 칠해지기를 기대하던 코드는 그 영역에 직접 InvalidateVisual을 불러야 합니다.
  • RenderSubtree를 재정의한 타입은 하위 트리째 기록됨 - 그려지는 결과는 같지만, 하위 요소 하나가 바뀌어도 하위 트리 전체를 다시 기록하고 다시 칠합니다. 패키지 밖 타입은 이 단위를 더 잘게 나눌 수 없습니다.

항목 컨트롤

  • GridViewRow가 Panel에서 Control로 바뀜 - Children, Add, Remove, Clear 같은 Panel 멤버와 ClipToBounds가 없어지고, Padding은 Control.PaddingProperty가 됩니다. 행 안의 셀을 Children으로 다루던 코드는 고쳐야 합니다.
  • 선택·호버 배경을 행 전체에 그림 - 선택, 호버, 교차 행 배경이 행 전체에 깔리고, TreeView의 들여쓰기와 펼침 버튼도 한 행으로 묶입니다. 항목 템플릿에서 같은 배경을 직접 그리던 애플리케이션은 템플릿 쪽 배경을 빼야 합니다.
  • TreeView 기본 행 높이가 달라짐 - 기본값이 max(BaseControlHeight, 24)에서 ListBox와 같은 max(18, BaseControlHeight - 2)로 바뀌어, 기본 테마에서 28에서 26이 됩니다. TreeView.ItemHeight를 직접 지정했다면 영향이 없습니다.
  • 재사용된 컨테이너가 훅이 쓴 값을 전부 되돌림 - 예전에는 정해진 일곱 개 속성만 초기화해 나머지는 훅이 쓴 값이 다음 항목까지 남았습니다. 이제 훅이 바꾼 MewProperty를 전부 되돌리므로, 값이 남기를 기대하던 코드는 스타일로 옮겨야 합니다.

메뉴

  • 메뉴 높이 상한 기본값이 없어짐 - ContextMenu.MaxMenuHeight, DropDownButton.MaxDropDownHeight, SplitButton.MaxDropDownHeight의 기본값이 320에서 double.PositiveInfinity로 바뀌었습니다. 320 DIP 상한이 필요하면 직접 지정해야 합니다.

Windows 텍스트

  • Win32 백엔드의 기본 텍스트 엔진이 DirectWrite로 바뀜 - GDI와 MewVG Win32 백엔드가 DirectWrite로 글자를 그려 글꼴 해석과 글자 모양, 텍스트 측정값이 달라집니다. 예전 동작이 필요하면 MewUIWin32TextEngine을 Gdi로 지정합니다.

Full Changelog: v0.21.1...v0.22.0