1 Commits

Author SHA1 Message Date
ArthurSonzogni
fd251a6463 v6.0.0 2025-03-23 18:37:34 +01:00
6 changed files with 26 additions and 45 deletions

View File

@@ -104,7 +104,7 @@ jobs:
--gcov-executable '${{ matrix.gcov_executable }}'; --gcov-executable '${{ matrix.gcov_executable }}';
- name: Windows - Test and coverage - name: Windows - Test and coverage
if: runner.os == 'Windows' if: runner.os == 'Windows' && false
working-directory: ./build working-directory: ./build
run: > run: >
OpenCppCoverage.exe OpenCppCoverage.exe

View File

@@ -1,23 +1,8 @@
Changelog Changelog
========= =========
6.0.2 (2025-03-30) current (development)
----- ---------------------
### Component
- BugFix: Fix major crash on Windows affecting all components. See #1020
- BugFix: Fix focusRelative.
6.0.1 (2025-03-28)
-----
Same as v6.0.0.
Due to a problem tag v6.0.0 was replaced. This isn't a good practice and affect
developers that started using it in the short timeframe. Submitting a new
release with the same content is the best way to fix this.
See #1017 and #1019.
6.0.0 (2025-03-23) 6.0.0 (2025-03-23)
----- -----
@@ -89,10 +74,6 @@ See #1017 and #1019.
- See `selectionStyleReset` decorator. - See `selectionStyleReset` decorator.
- Breaking change: Change how "focus"/"select" are handled. This fixes the - Breaking change: Change how "focus"/"select" are handled. This fixes the
behavior. behavior.
- Breaking change: `Component::OnRender()` becomes the method to override to
render a component. This replaces `Component::Render()` that is still in use
to call the rendering method on the children. This change allows to fix a
couple of issues around focus handling.
### Screen ### Screen
- Feature: Add `Box::IsEmpty()`. - Feature: Add `Box::IsEmpty()`.

View File

@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.12)
project(ftxui project(ftxui
LANGUAGES CXX LANGUAGES CXX
VERSION 6.0.2 VERSION 6.0.0
DESCRIPTION "C++ Functional Terminal User Interface." DESCRIPTION "C++ Functional Terminal User Interface."
) )

View File

@@ -372,7 +372,7 @@ include(FetchContent)
FetchContent_Declare(ftxui FetchContent_Declare(ftxui
GIT_REPOSITORY https://github.com/ArthurSonzogni/ftxui GIT_REPOSITORY https://github.com/ArthurSonzogni/ftxui
GIT_TAG v6.0.2 GIT_TAG v6.0.0
) )
FetchContent_GetProperties(ftxui) FetchContent_GetProperties(ftxui)
@@ -388,7 +388,7 @@ If you don't, FTXUI may be used from the following packages:
- [conan.io](https://conan.io/center/ftxui) - [conan.io](https://conan.io/center/ftxui)
- [openSUSE](https://build.opensuse.org/package/show/devel:libraries:c_c++/ftxui) - [openSUSE](https://build.opensuse.org/package/show/devel:libraries:c_c++/ftxui)
- -
[![Packaging status](https://repology.org/badge/vertical-allrepos/libftxui.svg)](https://repology.org/project/libftxui/versions) [![Packaging status](https://repology.org/badge/vertical-allrepos/ftxui.svg)](https://repology.org/project/ftxui/versions)
If you choose to build and link FTXUI yourself, `ftxui-component` must be first in the linking order relative to the other FTXUI libraries, i.e. If you choose to build and link FTXUI yourself, `ftxui-component` must be first in the linking order relative to the other FTXUI libraries, i.e.
```bash ```bash

View File

@@ -36,7 +36,7 @@ Decorator focusPositionRelative(float x, float y) {
void ComputeRequirement() override { void ComputeRequirement() override {
NodeDecorator::ComputeRequirement(); NodeDecorator::ComputeRequirement();
requirement_.focused.enabled = true; requirement_.focused.enabled = false;
requirement_.focused.node = this; requirement_.focused.node = this;
requirement_.focused.box.x_min = int(float(requirement_.min_x) * x_); requirement_.focused.box.x_min = int(float(requirement_.min_x) * x_);
requirement_.focused.box.y_min = int(float(requirement_.min_y) * y_); requirement_.focused.box.y_min = int(float(requirement_.min_y) * y_);

View File

@@ -125,8 +125,6 @@ void Render(Screen& screen, Node* node, Selection& selection) {
node->Select(selection); node->Select(selection);
} }
if (node->requirement().focused.enabled
#if defined(FTXUI_MICROSOFT_TERMINAL_FALLBACK)
// Setting the cursor to the right position allow folks using CJK (China, // Setting the cursor to the right position allow folks using CJK (China,
// Japanese, Korean, ...) characters to see their [input method editor] // Japanese, Korean, ...) characters to see their [input method editor]
// displayed at the right location. See [issue]. // displayed at the right location. See [issue].
@@ -138,14 +136,16 @@ void Render(Screen& screen, Node* node, Selection& selection) {
// https://github.com/ArthurSonzogni/FTXUI/issues/2#issuecomment-505282355 // https://github.com/ArthurSonzogni/FTXUI/issues/2#issuecomment-505282355
// //
// Unfortunately, Microsoft terminal do not handle properly hiding the // Unfortunately, Microsoft terminal do not handle properly hiding the
// cursor. Instead the character under the cursor is hidden, which is a // cursor. Instead the character under the cursor is hidden, which is a big
// big problem. As a result, we can't enable setting cursor to the right // problem. As a result, we can't enable setting cursor to the right
// location. It will be displayed at the bottom right corner. // location. It will be displayed at the bottom right corner.
// See: // See:
// https://github.com/microsoft/terminal/issues/1203 // https://github.com/microsoft/terminal/issues/1203
// https://github.com/microsoft/terminal/issues/3093 // https://github.com/microsoft/terminal/issues/3093
&& if (node->requirement().focused.enabled
node->requirement().focused.cursor_shape != Screen::Cursor::Shape::Hidden #if defined(FTXUI_MICROSOFT_TERMINAL_FALLBACK)
||
node->requirement().focused.cursor_shape == Screen::Cursor::Shape::Hidden
#endif #endif
) { ) {
screen.SetCursor(Screen::Cursor{ screen.SetCursor(Screen::Cursor{