File tree Expand file tree Collapse file tree 4 files changed +21
-3
lines changed
Filter options
Expand file tree Collapse file tree 4 files changed +21
-3
lines changed
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ set(SOURCE ${LITEBROWSER_PATH}/main.cpp
26
26
${LITEBROWSER_PATH} /browser_wnd.cpp
27
27
${LITEBROWSER_PATH} /web_history.cpp
28
28
${CONTAINER_PATH} /cairo_borders.cpp
29
+ ${CONTAINER_PATH} /cairo_pango.cpp
29
30
${LITEBROWSER_PATH} /http_request.cpp
30
31
${LITEBROWSER_PATH} /web_page.cpp
31
32
${LITEBROWSER_PATH} /http_requests_pool.cpp
@@ -36,6 +37,7 @@ set(HEADERS ${LITEBROWSER_PATH}/browser_wnd.h
36
37
${LITEBROWSER_PATH} /globals.h
37
38
${CONTAINER_PATH} /container_linux.h
38
39
${CONTAINER_PATH} /cairo_borders.h
40
+ ${CONTAINER_PATH} /cairo_pango.h
39
41
${LITEBROWSER_PATH} /web_history.h
40
42
${LITEBROWSER_PATH} /http_request.h
41
43
${LITEBROWSER_PATH} /web_page.h
Original file line number Diff line number Diff line change @@ -327,6 +327,12 @@ void litebrowser::web_page::on_pool_update_state()
327
327
m_html_host->queue_action (html_host_interface::queue_action_update_state);
328
328
}
329
329
330
+ double litebrowser::web_page::get_screen_dpi () const
331
+ {
332
+ GdkScreen* screen = gdk_screen_get_default ();
333
+ return gdk_screen_get_resolution (screen);
334
+ }
335
+
330
336
// ////////////////////////////////////////////////////////
331
337
332
338
litebrowser::image_file::image_file (std::string url, bool redraw_on_ready) :
Original file line number Diff line number Diff line change 1
1
#ifndef LITEBROWSER_WEB_PAGE_H
2
2
#define LITEBROWSER_WEB_PAGE_H
3
3
4
- #include " ../litehtml/containers/linux/container_linux.h"
4
+ #include " ../litehtml/containers/linux/cairo_pango.h"
5
+ #include < gtkmm.h>
5
6
#include " html_host.h"
6
7
#include " http_requests_pool.h"
7
8
@@ -90,7 +91,7 @@ namespace litebrowser
90
91
cairo_surface_t * get () { return cairo_surface_reference (surface); }
91
92
};
92
93
93
- class web_page : public container_linux ,
94
+ class web_page : public cairo_pango ,
94
95
public std::enable_shared_from_this<web_page>
95
96
{
96
97
litehtml::string m_url;
@@ -123,6 +124,15 @@ namespace litebrowser
123
124
void make_url ( const char * url, const char * basepath, litehtml::string& out ) override ;
124
125
void load_image (const char * src, const char * baseurl, bool redraw_on_ready) override ;
125
126
static cairo_surface_wrapper surface_from_pixbuf (const Glib::RefPtr<Gdk::Pixbuf>& bmp);
127
+ double get_screen_dpi () const override ;
128
+ int get_screen_width () const override
129
+ {
130
+ return Gdk::screen_width ();
131
+ }
132
+ int get_screen_height () const override
133
+ {
134
+ return Gdk::screen_height ();
135
+ }
126
136
127
137
void show_hash (const litehtml::string& hash);
128
138
void show_hash_and_reset ()
You can’t perform that action at this time.
0 commit comments