some modifications
This commit is contained in:
parent
8bf35968ef
commit
fff5926be5
@ -1,32 +0,0 @@
|
||||
#ifndef NANA_DETAIL_MSG_PACKET_HPP
|
||||
#define NANA_DETAIL_MSG_PACKET_HPP
|
||||
#include <X11/Xlib.h>
|
||||
#include <vector>
|
||||
#include <nana/deploy.hpp>
|
||||
|
||||
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<nana::string> * files;
|
||||
}mouse_drop;
|
||||
}u;
|
||||
};
|
||||
}//end namespace detail
|
||||
}//end namespace nana
|
||||
#endif
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#ifndef NANA_DETAIL_MSG_DISPATCHER_HPP
|
||||
#define NANA_DETAIL_MSG_DISPATCHER_HPP
|
||||
#include "msg_packet.hpp"
|
||||
#include <nana/detail/linux_X11/msg_packet.hpp>
|
||||
#include <nana/system/platform.hpp>
|
||||
#include <list>
|
||||
#include <set>
|
@ -16,7 +16,6 @@
|
||||
#include <nana/config.hpp>
|
||||
|
||||
#include PLATFORM_SPEC_HPP
|
||||
#include <nana/detail/linux_X11/msg_dispatcher.hpp>
|
||||
#include <X11/Xlocale.h>
|
||||
#include <locale>
|
||||
#include <map>
|
||||
@ -29,6 +28,8 @@
|
||||
#include <errno.h>
|
||||
#include <sstream>
|
||||
|
||||
#include "msg_dispatcher.hpp"
|
||||
|
||||
namespace nana
|
||||
{
|
||||
namespace detail
|
||||
|
@ -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_))
|
||||
|
@ -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<int>((pos.y - editor_.points_.offset.y) * editor_.line_height() + editor_._m_text_top_base());
|
||||
int pos_x = static_cast<int>(pos.x - editor_.points_.offset.x);
|
||||
|
||||
return{ pos_x, pos_y };
|
||||
return{ static_cast<int>(pos.x - editor_.points_.offset.x), pos_y };
|
||||
}
|
||||
|
||||
nana::upoint screen_to_caret(point scrpos) override
|
||||
|
@ -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<color_rgb>(0xf0f0f0));
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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<element::crook> crook_;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user