Skip to content

Commit

Permalink
#266 Add clipboard buffer preview toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
o-sdn-o committed Nov 3, 2022
1 parent d722130 commit 097fc7f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 3 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,9 @@ Note: The following configuration sections are not implemented yet
</set>
<client>
<background fgc=whitedk bgc=0xFF000000 /> <!-- Desktop background color. -->
<clip_preview size=80x25 />
<clipboard>
<preview enabled=true size=80x25 />
</clipboard>
<viewport coor=0,0 />
<tooltip timeout=500ms enabled=true />
<glowfx=true /> <!-- Show glow effect around selected item. -->
Expand Down
4 changes: 3 additions & 1 deletion src/netxs/apps.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,9 @@ R"==(
</set>
<client>
<background fgc=whitedk bgc=0xFF000000 /> <!-- Desktop background color. -->
<clip_preview size=80x25 />
<clipboard>
<preview enabled=true size=80x25 />
</clipboard>
<viewport coor=0,0 />
<tooltip timeout=500ms enabled=true />
<glowfx=true /> <!-- Show glow effect around selected item. -->
Expand Down
6 changes: 4 additions & 2 deletions src/netxs/console/console.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5323,6 +5323,7 @@ namespace netxs::console
text title;
text selected;
twod coor;
bool clip_preview_show;
twod clip_preview_size;
cell background_color;
si32 legacy_mode;
Expand All @@ -5340,7 +5341,8 @@ namespace netxs::console
void read(T&& config)
{
config.cd("/config/client/");
clip_preview_size = config.take("clip_preview/size", twod{ 80,25 });
clip_preview_show = config.take("clipboard/preview/enabled", true);
clip_preview_size = config.take("clipboard/preview/size", twod{ 80,25 });
coor = config.take("viewport/coor", dot_00); //todo Move user's viewport to the last saved position
tooltip_timeout = config.take("tooltip/timeout", period{ 500ms });
tooltip_enabled = config.take("tooltip/enabled", true);
Expand Down Expand Up @@ -5599,7 +5601,7 @@ namespace netxs::console
draw_mouse_pointer(canvas);
}

if (!direct)
if (!direct && props.clip_preview_show)
{
draw_clip_preview(canvas);
}
Expand Down

0 comments on commit 097fc7f

Please sign in to comment.