Skip to content

Commit

Permalink
#273 Fix clipboard forwarding
Browse files Browse the repository at this point in the history
  • Loading branch information
o-sdn-o committed Dec 8, 2022
1 parent 0d73304 commit ccde064
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 38 deletions.
13 changes: 9 additions & 4 deletions src/netxs/apps/term.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,15 @@ namespace netxs::app::term
auto arg_shadow = view{ arg };
auto term_type = shared::app_class(arg_shadow);
arg = arg_shadow;
if (term_type == shared::app_type::normal) window->plugin<pro::focus>()
->plugin<pro::track>()
->plugin<pro::acryl>()
->plugin<pro::cache>();
if (term_type == shared::app_type::normal)
{
window->plugin<pro::focus>()
->plugin<pro::track>()
->plugin<pro::acryl>()
->plugin<pro::cache>();
}
else window->plugin<pro::focus>(faux);

auto object = window->attach(ui::fork::ctor(axis::Y))
->colors(cB.fgc(), cB.bgc());
auto term_stat_area = object->attach(slot::_2, ui::fork::ctor(axis::Y));
Expand Down
71 changes: 37 additions & 34 deletions src/netxs/console/console.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4168,7 +4168,7 @@ namespace netxs::console

public:
focus(base&&) = delete;
focus(base& boss)
focus(base& boss, bool visible = true)
: skill{ boss }
{
boss.SUBMIT_T(tier::general, e2::form::proceed::functor, memo, proc)
Expand Down Expand Up @@ -4252,43 +4252,46 @@ namespace netxs::console
boss.SIGNAL(tier::anycast, e2::form::highlight::any, faux);
}
};
boss.SUBMIT_T(tier::release, e2::render::prerender, memo, parent_canvas)
if (visible)
{
//todo revise, too many fillings (mold's artifacts)
auto normal = boss.base::color();
auto title_fg_color = rgba{ 0xFFffffff };
if (!pool.empty())
boss.SUBMIT_T(tier::release, e2::render::prerender, memo, parent_canvas)
{
auto bright = skin::color(tone::brighter);
auto shadow = skin::color(tone::shadower);
//todo unify, make it more contrast
shadow.alpha(0x80);
bright.fgc(title_fg_color);
shadow.fgc(title_fg_color);
auto fillup = [&](auto bright, auto shadow)
{
parent_canvas.fill(shadow);
};
if (normal.bgc().alpha())
//todo revise, too many fillings (mold's artifacts)
auto normal = boss.base::color();
auto title_fg_color = rgba{ 0xFFffffff };
if (!pool.empty())
{
auto fuse_bright = [&](cell& c) { c.fuse(normal); c.fuse(bright); };
auto fuse_shadow = [&](cell& c) { c.fuse(normal); c.fuse(shadow); };
fillup(fuse_shadow, fuse_bright);
}
else
{
auto only_bright = [&](cell& c) { c.fuse(bright); };
auto only_shadow = [&](cell& c) { c.fuse(shadow); };
fillup(only_shadow, only_bright);
auto bright = skin::color(tone::brighter);
auto shadow = skin::color(tone::shadower);
//todo unify, make it more contrast
shadow.alpha(0x80);
bright.fgc(title_fg_color);
shadow.fgc(title_fg_color);
auto fillup = [&](auto bright, auto shadow)
{
parent_canvas.fill(shadow);
};
if (normal.bgc().alpha())
{
auto fuse_bright = [&](cell& c) { c.fuse(normal); c.fuse(bright); };
auto fuse_shadow = [&](cell& c) { c.fuse(normal); c.fuse(shadow); };
fillup(fuse_shadow, fuse_bright);
}
else
{
auto only_bright = [&](cell& c) { c.fuse(bright); };
auto only_shadow = [&](cell& c) { c.fuse(shadow); };
fillup(only_shadow, only_bright);
}
// Draw the border around
auto area = parent_canvas.full();
auto mark = skin::color(tone::kb_focus);
mark.fgc(title_fg_color); //todo unify, make it more contrast
auto fill = [&](cell& c) { c.fuse(mark); };
parent_canvas.cage(area, dot_21, fill);
}
// Draw the border around
auto area = parent_canvas.full();
auto mark = skin::color(tone::kb_focus);
mark.fgc(title_fg_color); //todo unify, make it more contrast
auto fill = [&](cell& c) { c.fuse(mark); };
parent_canvas.cage(area, dot_21, fill);
}
};
};
}
}
};

Expand Down

0 comments on commit ccde064

Please sign in to comment.