Merge branch 'ocornut:master' into sdl_cpu
This commit is contained in:
@@ -85,6 +85,8 @@ Other Changes:
|
|||||||
- Reworked io.ConfigInputTextEnterKeepActive mode so that pressing Enter will
|
- Reworked io.ConfigInputTextEnterKeepActive mode so that pressing Enter will
|
||||||
deactivate/reactivate the item in order for e.g. IsItemDeactivatedAfterEdit()
|
deactivate/reactivate the item in order for e.g. IsItemDeactivatedAfterEdit()
|
||||||
signals to be emitted the same way regardless of that setting. (#9001, #9115)
|
signals to be emitted the same way regardless of that setting. (#9001, #9115)
|
||||||
|
- Fixed a glitch when using ImGuiInputTextFlags_ElideLeft where the local x offset
|
||||||
|
would be incorrect during the deactivation frame. (#9298)
|
||||||
- Style:
|
- Style:
|
||||||
- Border sizes are now scaled (and rounded) by ScaleAllSizes().
|
- Border sizes are now scaled (and rounded) by ScaleAllSizes().
|
||||||
- When using large values with ScallAllSizes(), the following items thickness
|
- When using large values with ScallAllSizes(), the following items thickness
|
||||||
@@ -134,6 +136,7 @@ Other Changes:
|
|||||||
to allocate one. (#8677) [@micb25]
|
to allocate one. (#8677) [@micb25]
|
||||||
- WebGPU: fixed undefined behaviors in example code for requesting adapter
|
- WebGPU: fixed undefined behaviors in example code for requesting adapter
|
||||||
and device. (#9246, #9256) [@r-lyeh]
|
and device. (#9246, #9256) [@r-lyeh]
|
||||||
|
- SDL2+WebGPU: fixed hi-dpi handling. (#9300) [@ypujante]
|
||||||
- GLFW/SDL2/SDL3+WebGPU: removed suport for Emscripten <4.0.10. (#9281) [@ypujante]
|
- GLFW/SDL2/SDL3+WebGPU: removed suport for Emscripten <4.0.10. (#9281) [@ypujante]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ int main(int, char**)
|
|||||||
|
|
||||||
// Create window with graphics context
|
// Create window with graphics context
|
||||||
float main_scale = ImGui_ImplSDL2_GetContentScaleForDisplay(0);
|
float main_scale = ImGui_ImplSDL2_GetContentScaleForDisplay(0);
|
||||||
SDL_WindowFlags window_flags = SDL_WINDOW_RESIZABLE;
|
SDL_WindowFlags window_flags = (SDL_WindowFlags)(SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI);
|
||||||
SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL2+WebGPU example", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, wgpu_surface_width, wgpu_surface_height, window_flags);
|
SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL2+WebGPU example", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, wgpu_surface_width, wgpu_surface_height, window_flags);
|
||||||
if (window == nullptr)
|
if (window == nullptr)
|
||||||
{
|
{
|
||||||
@@ -143,7 +143,7 @@ int main(int, char**)
|
|||||||
|
|
||||||
// React to changes in screen size
|
// React to changes in screen size
|
||||||
int width, height;
|
int width, height;
|
||||||
SDL_GetWindowSize(window, &width, &height);
|
SDL_GetWindowSizeInPixels(window, &width, &height);
|
||||||
if (width != wgpu_surface_width || height != wgpu_surface_height)
|
if (width != wgpu_surface_width || height != wgpu_surface_height)
|
||||||
ResizeSurface(width, height);
|
ResizeSurface(width, height);
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -5568,7 +5568,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Find render position for right alignment (single-line only)
|
// Find render position for right alignment (single-line only)
|
||||||
if (g.ActiveId != id && flags & ImGuiInputTextFlags_ElideLeft)
|
if (g.ActiveId != id && (flags & ImGuiInputTextFlags_ElideLeft) && !render_cursor && !render_selection)
|
||||||
draw_pos.x = ImMin(draw_pos.x, frame_bb.Max.x - CalcTextSize(buf_display, NULL).x - style.FramePadding.x);
|
draw_pos.x = ImMin(draw_pos.x, frame_bb.Max.x - CalcTextSize(buf_display, NULL).x - style.FramePadding.x);
|
||||||
//draw_scroll.x = state->Scroll.x; // Preserve scroll when inactive?
|
//draw_scroll.x = state->Scroll.x; // Preserve scroll when inactive?
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user