diff options
author | Mark Tiefenbruck <mark@fluxbox.org> | 2008-01-05 01:39:19 (GMT) |
---|---|---|
committer | Mark Tiefenbruck <mark@fluxbox.org> | 2008-01-05 01:39:19 (GMT) |
commit | ac1bd7e0981222bf340ce7defb2bb8307d42a0a2 (patch) | |
tree | c8fb9c618184e7ac44f6138409cab3fab86b23e4 /src/Screen.cc | |
parent | 60ba709c2f47cc2c7b877aef1b0f297b097853e5 (diff) | |
download | fluxbox-ac1bd7e0981222bf340ce7defb2bb8307d42a0a2.zip fluxbox-ac1bd7e0981222bf340ce7defb2bb8307d42a0a2.tar.bz2 |
update code to use ThemeProxy
Diffstat (limited to 'src/Screen.cc')
-rw-r--r-- | src/Screen.cc | 72 |
1 files changed, 33 insertions, 39 deletions
diff --git a/src/Screen.cc b/src/Screen.cc index 7deab8b..5edbcaf 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -34,12 +34,6 @@ | |||
34 | #include "FocusControl.hh" | 34 | #include "FocusControl.hh" |
35 | #include "ScreenPlacement.hh" | 35 | #include "ScreenPlacement.hh" |
36 | 36 | ||
37 | // themes | ||
38 | #include "FbWinFrameTheme.hh" | ||
39 | #include "RootTheme.hh" | ||
40 | #include "WinButtonTheme.hh" | ||
41 | #include "SlitTheme.hh" | ||
42 | |||
43 | // menu items | 37 | // menu items |
44 | #include "FbTk/BoolMenuItem.hh" | 38 | #include "FbTk/BoolMenuItem.hh" |
45 | #include "FbTk/IntMenuItem.hh" | 39 | #include "FbTk/IntMenuItem.hh" |
@@ -451,7 +445,7 @@ BScreen::BScreen(FbTk::ResourceManager &rm, | |||
451 | 445 | ||
452 | imageControl().setDither(*resource.image_dither); | 446 | imageControl().setDither(*resource.image_dither); |
453 | 447 | ||
454 | winFrameTheme().reconfigSig().attach(this);// for geom window | 448 | winFrameTheme()->reconfigSig().attach(this);// for geom window |
455 | 449 | ||
456 | 450 | ||
457 | geom_visible = false; | 451 | geom_visible = false; |
@@ -1799,13 +1793,13 @@ void BScreen::showPosition(int x, int y) { | |||
1799 | 1793 | ||
1800 | m_pos_window.clear(); | 1794 | m_pos_window.clear(); |
1801 | 1795 | ||
1802 | winFrameTheme().font().drawText(m_pos_window, | 1796 | winFrameTheme()->font().drawText(m_pos_window, |
1803 | screenNumber(), | 1797 | screenNumber(), |
1804 | winFrameTheme().iconbarTheme().focusedText().textGC(), | 1798 | winFrameTheme()->iconbarTheme().focusedText().textGC(), |
1805 | label, strlen(label), | 1799 | label, strlen(label), |
1806 | winFrameTheme().bevelWidth(), | 1800 | winFrameTheme()->bevelWidth(), |
1807 | winFrameTheme().bevelWidth() + | 1801 | winFrameTheme()->bevelWidth() + |
1808 | winFrameTheme().font().ascent()); | 1802 | winFrameTheme()->font().ascent()); |
1809 | 1803 | ||
1810 | } | 1804 | } |
1811 | 1805 | ||
@@ -1851,13 +1845,13 @@ void BScreen::showGeometry(int gx, int gy) { | |||
1851 | m_geom_window.clear(); | 1845 | m_geom_window.clear(); |
1852 | 1846 | ||
1853 | //!! TODO: geom window again?! repeated | 1847 | //!! TODO: geom window again?! repeated |
1854 | winFrameTheme().font().drawText(m_geom_window, | 1848 | winFrameTheme()->font().drawText(m_geom_window, |
1855 | screenNumber(), | 1849 | screenNumber(), |
1856 | winFrameTheme().iconbarTheme().focusedText().textGC(), | 1850 | winFrameTheme()->iconbarTheme().focusedText().textGC(), |
1857 | label, strlen(label), | 1851 | label, strlen(label), |
1858 | winFrameTheme().bevelWidth(), | 1852 | winFrameTheme()->bevelWidth(), |
1859 | winFrameTheme().bevelWidth() + | 1853 | winFrameTheme()->bevelWidth() + |
1860 | winFrameTheme().font().ascent()); | 1854 | winFrameTheme()->font().ascent()); |
1861 | } | 1855 | } |
1862 | 1856 | ||
1863 | 1857 | ||
@@ -1914,32 +1908,32 @@ void BScreen::renderGeomWindow() { | |||
1914 | "W: %04d x H: %04d", "Representative maximum sized text for width and height dialog").c_str(), | 1908 | "W: %04d x H: %04d", "Representative maximum sized text for width and height dialog").c_str(), |
1915 | 0, 0); | 1909 | 0, 0); |
1916 | 1910 | ||
1917 | int geom_h = winFrameTheme().font().height() + winFrameTheme().bevelWidth()*2; | 1911 | int geom_h = winFrameTheme()->font().height() + winFrameTheme()->bevelWidth()*2; |
1918 | int geom_w = winFrameTheme().font().textWidth(label, strlen(label)) + winFrameTheme().bevelWidth()*2; | 1912 | int geom_w = winFrameTheme()->font().textWidth(label, strlen(label)) + winFrameTheme()->bevelWidth()*2; |
1919 | m_geom_window.resize(geom_w, geom_h); | 1913 | m_geom_window.resize(geom_w, geom_h); |
1920 | 1914 | ||
1921 | m_geom_window.setBorderWidth(winFrameTheme().border(true).width()); | 1915 | m_geom_window.setBorderWidth(winFrameTheme()->border(true).width()); |
1922 | m_geom_window.setBorderColor(winFrameTheme().border(true).color()); | 1916 | m_geom_window.setBorderColor(winFrameTheme()->border(true).color()); |
1923 | 1917 | ||
1924 | 1918 | ||
1925 | Pixmap tmp = geom_pixmap; | 1919 | Pixmap tmp = geom_pixmap; |
1926 | 1920 | ||
1927 | if (winFrameTheme().iconbarTheme().focusedTexture().type() & FbTk::Texture::PARENTRELATIVE) { | 1921 | if (winFrameTheme()->iconbarTheme().focusedTexture().type() & FbTk::Texture::PARENTRELATIVE) { |
1928 | if (!winFrameTheme().titleFocusTexture().usePixmap()) { | 1922 | if (!winFrameTheme()->titleFocusTexture().usePixmap()) { |
1929 | geom_pixmap = None; | 1923 | geom_pixmap = None; |
1930 | m_geom_window.setBackgroundColor(winFrameTheme().titleFocusTexture().color()); | 1924 | m_geom_window.setBackgroundColor(winFrameTheme()->titleFocusTexture().color()); |
1931 | } else { | 1925 | } else { |
1932 | geom_pixmap = imageControl().renderImage(m_geom_window.width(), m_geom_window.height(), | 1926 | geom_pixmap = imageControl().renderImage(m_geom_window.width(), m_geom_window.height(), |
1933 | winFrameTheme().titleFocusTexture()); | 1927 | winFrameTheme()->titleFocusTexture()); |
1934 | m_geom_window.setBackgroundPixmap(geom_pixmap); | 1928 | m_geom_window.setBackgroundPixmap(geom_pixmap); |
1935 | } | 1929 | } |
1936 | } else { | 1930 | } else { |
1937 | if (!winFrameTheme().iconbarTheme().focusedTexture().usePixmap()) { | 1931 | if (!winFrameTheme()->iconbarTheme().focusedTexture().usePixmap()) { |
1938 | geom_pixmap = None; | 1932 | geom_pixmap = None; |
1939 | m_geom_window.setBackgroundColor(winFrameTheme().iconbarTheme().focusedTexture().color()); | 1933 | m_geom_window.setBackgroundColor(winFrameTheme()->iconbarTheme().focusedTexture().color()); |
1940 | } else { | 1934 | } else { |
1941 | geom_pixmap = imageControl().renderImage(m_geom_window.width(), m_geom_window.height(), | 1935 | geom_pixmap = imageControl().renderImage(m_geom_window.width(), m_geom_window.height(), |
1942 | winFrameTheme().iconbarTheme().focusedTexture()); | 1936 | winFrameTheme()->iconbarTheme().focusedTexture()); |
1943 | m_geom_window.setBackgroundPixmap(geom_pixmap); | 1937 | m_geom_window.setBackgroundPixmap(geom_pixmap); |
1944 | } | 1938 | } |
1945 | } | 1939 | } |
@@ -1952,32 +1946,32 @@ void BScreen::renderGeomWindow() { | |||
1952 | 1946 | ||
1953 | void BScreen::renderPosWindow() { | 1947 | void BScreen::renderPosWindow() { |
1954 | 1948 | ||
1955 | int pos_h = winFrameTheme().font().height() + winFrameTheme().bevelWidth()*2; | 1949 | int pos_h = winFrameTheme()->font().height() + winFrameTheme()->bevelWidth()*2; |
1956 | int pos_w = winFrameTheme().font().textWidth("0:00000 x 0:00000", 17) + winFrameTheme().bevelWidth()*2; | 1950 | int pos_w = winFrameTheme()->font().textWidth("0:00000 x 0:00000", 17) + winFrameTheme()->bevelWidth()*2; |
1957 | m_pos_window.resize(pos_w, pos_h); | 1951 | m_pos_window.resize(pos_w, pos_h); |
1958 | 1952 | ||
1959 | m_pos_window.setBorderWidth(winFrameTheme().border(true).width()); | 1953 | m_pos_window.setBorderWidth(winFrameTheme()->border(true).width()); |
1960 | m_pos_window.setBorderColor(winFrameTheme().border(true).color()); | 1954 | m_pos_window.setBorderColor(winFrameTheme()->border(true).color()); |
1961 | 1955 | ||
1962 | 1956 | ||
1963 | Pixmap tmp = pos_pixmap; | 1957 | Pixmap tmp = pos_pixmap; |
1964 | 1958 | ||
1965 | if (winFrameTheme().iconbarTheme().focusedTexture().type() & FbTk::Texture::PARENTRELATIVE) { | 1959 | if (winFrameTheme()->iconbarTheme().focusedTexture().type() & FbTk::Texture::PARENTRELATIVE) { |
1966 | if (!winFrameTheme().titleFocusTexture().usePixmap()) { | 1960 | if (!winFrameTheme()->titleFocusTexture().usePixmap()) { |
1967 | pos_pixmap = None; | 1961 | pos_pixmap = None; |
1968 | m_pos_window.setBackgroundColor(winFrameTheme().titleFocusTexture().color()); | 1962 | m_pos_window.setBackgroundColor(winFrameTheme()->titleFocusTexture().color()); |
1969 | } else { | 1963 | } else { |
1970 | pos_pixmap = imageControl().renderImage(m_pos_window.width(), m_pos_window.height(), | 1964 | pos_pixmap = imageControl().renderImage(m_pos_window.width(), m_pos_window.height(), |
1971 | winFrameTheme().titleFocusTexture()); | 1965 | winFrameTheme()->titleFocusTexture()); |
1972 | m_pos_window.setBackgroundPixmap(pos_pixmap); | 1966 | m_pos_window.setBackgroundPixmap(pos_pixmap); |
1973 | } | 1967 | } |
1974 | } else { | 1968 | } else { |
1975 | if (!winFrameTheme().iconbarTheme().focusedTexture().usePixmap()) { | 1969 | if (!winFrameTheme()->iconbarTheme().focusedTexture().usePixmap()) { |
1976 | pos_pixmap = None; | 1970 | pos_pixmap = None; |
1977 | m_pos_window.setBackgroundColor(winFrameTheme().iconbarTheme().focusedTexture().color()); | 1971 | m_pos_window.setBackgroundColor(winFrameTheme()->iconbarTheme().focusedTexture().color()); |
1978 | } else { | 1972 | } else { |
1979 | pos_pixmap = imageControl().renderImage(m_pos_window.width(), m_pos_window.height(), | 1973 | pos_pixmap = imageControl().renderImage(m_pos_window.width(), m_pos_window.height(), |
1980 | winFrameTheme().iconbarTheme().focusedTexture()); | 1974 | winFrameTheme()->iconbarTheme().focusedTexture()); |
1981 | m_pos_window.setBackgroundPixmap(pos_pixmap); | 1975 | m_pos_window.setBackgroundPixmap(pos_pixmap); |
1982 | } | 1976 | } |
1983 | } | 1977 | } |