diff --git a/include/nana/detail/linux_X11/msg_packet.hpp b/include/nana/detail/linux_X11/msg_packet.hpp deleted file mode 100644 index b1fc3dec..00000000 --- a/include/nana/detail/linux_X11/msg_packet.hpp +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef NANA_DETAIL_MSG_PACKET_HPP -#define NANA_DETAIL_MSG_PACKET_HPP -#include -#include -#include - -namespace nana -{ -namespace detail -{ - struct msg_packet_tag - { - enum kind_t{kind_xevent, kind_mouse_drop, kind_cleanup}; - kind_t kind; - union - { - XEvent xevent; - - Window packet_window; //Avaiable if the packet is not kind_xevent - struct mouse_drop_tag - { - Window window; - int x; - int y; - std::vector * files; - }mouse_drop; - }u; - }; -}//end namespace detail -}//end namespace nana -#endif - diff --git a/include/nana/detail/linux_X11/msg_dispatcher.hpp b/source/detail/linux_X11/msg_dispatcher.hpp similarity index 99% rename from include/nana/detail/linux_X11/msg_dispatcher.hpp rename to source/detail/linux_X11/msg_dispatcher.hpp index eab77f2f..7ba64b4f 100644 --- a/include/nana/detail/linux_X11/msg_dispatcher.hpp +++ b/source/detail/linux_X11/msg_dispatcher.hpp @@ -17,7 +17,7 @@ #ifndef NANA_DETAIL_MSG_DISPATCHER_HPP #define NANA_DETAIL_MSG_DISPATCHER_HPP -#include "msg_packet.hpp" +#include #include #include #include diff --git a/source/detail/linux_X11/platform_spec.cpp b/source/detail/linux_X11/platform_spec.cpp index de9ae3aa..7501158d 100644 --- a/source/detail/linux_X11/platform_spec.cpp +++ b/source/detail/linux_X11/platform_spec.cpp @@ -16,7 +16,6 @@ #include #include PLATFORM_SPEC_HPP -#include #include #include #include @@ -29,6 +28,8 @@ #include #include +#include "msg_dispatcher.hpp" + namespace nana { namespace detail diff --git a/source/gui/widgets/checkbox.cpp b/source/gui/widgets/checkbox.cpp index b0d89b74..49626834 100644 --- a/source/gui/widgets/checkbox.cpp +++ b/source/gui/widgets/checkbox.cpp @@ -84,16 +84,6 @@ namespace checkbox return impl_; } - /* - void drawer::_m_draw(graph_reference graph) - { - _m_draw_background(graph); - _m_draw_title(graph); - _m_draw_checkbox(graph, graph.text_extent_size(STR("jN"), 2).height + 2); - API::lazy_refresh(); - } - */ - void drawer::_m_draw_background(graph_reference graph) { if(bground_mode::basic != API::effects_bground_mode(*widget_)) diff --git a/source/gui/widgets/skeletons/text_editor.cpp b/source/gui/widgets/skeletons/text_editor.cpp index 68e35b05..7b256c28 100644 --- a/source/gui/widgets/skeletons/text_editor.cpp +++ b/source/gui/widgets/skeletons/text_editor.cpp @@ -325,9 +325,8 @@ namespace nana{ namespace widgets pos.x = editor_._m_pixels_by_char(lnstr, pos.x) + editor_.text_area_.area.x; int pos_y = static_cast((pos.y - editor_.points_.offset.y) * editor_.line_height() + editor_._m_text_top_base()); - int pos_x = static_cast(pos.x - editor_.points_.offset.x); - return{ pos_x, pos_y }; + return{ static_cast(pos.x - editor_.points_.offset.x), pos_y }; } nana::upoint screen_to_caret(point scrpos) override diff --git a/source/gui/widgets/slider.cpp b/source/gui/widgets/slider.cpp index a83f3f2f..2e8ef4fc 100644 --- a/source/gui/widgets/slider.cpp +++ b/source/gui/widgets/slider.cpp @@ -66,7 +66,7 @@ namespace nana r.y = s.pos; r.height = s.scale; } - graph.round_rectangle(r, 3, 3, colors::black, true, {0xf0,0xf0,0xf0}); + graph.round_rectangle(r, 3, 3, colors::black, true, static_cast(0xf0f0f0)); } }; diff --git a/source/gui/widgets/treebox.cpp b/source/gui/widgets/treebox.cpp index 1c70e7e6..9362b243 100644 --- a/source/gui/widgets/treebox.cpp +++ b/source/gui/widgets/treebox.cpp @@ -1253,13 +1253,14 @@ namespace nana if(compset->comp_attribute(component::icon, attr)) { const nana::paint::image * img = nullptr; - if(compset->item_attribute().mouse_pointed) - img = &(compset->item_attribute().icon_hover); - else if(compset->item_attribute().expended) - img = &(compset->item_attribute().icon_expanded); + auto & item_attr = compset->item_attribute(); + if (item_attr.mouse_pointed) + img = &(item_attr.icon_hover); + else if (item_attr.expended) + img = &(item_attr.icon_expanded); if((nullptr == img) || img->empty()) - img = &(compset->item_attribute().icon_normal); + img = &(item_attr.icon_normal); if(! img->empty()) { @@ -1284,12 +1285,8 @@ namespace nana { comp_attribute_t attr; if (compset->comp_attribute(component::text, attr)) - { - graph.set_text_color(fgcolor_); - graph.string(point{ attr.area.x, attr.area.y + 3 }, compset->item_attribute().text); - } + graph.string(point{ attr.area.x, attr.area.y + 3 }, compset->item_attribute().text, fgcolor_); } - private: mutable facade crook_; };