| 781 | } |
| 782 | |
| 783 | bool |
| 784 | LayoutViewBase::configure (const std::string &name, const std::string &value) |
| 785 | { |
| 786 | lay::Dispatcher::configure (name, value); |
| 787 | |
| 788 | if (name == cfg_default_lyp_file) { |
| 789 | |
| 790 | m_def_lyp_file = value; |
| 791 | return false; // not taken - let others set it too. |
| 792 | |
| 793 | } else if (name == cfg_default_add_other_layers) { |
| 794 | |
| 795 | tl::from_string (value, m_add_other_layers); |
| 796 | return false; // not taken - let others set it too. |
| 797 | |
| 798 | } else if (name == cfg_background_color) { |
| 799 | |
| 800 | tl::Color color; |
| 801 | ColorConverter ().from_string (value, color); |
| 802 | background_color (color); |
| 803 | // do not take - let others receive the background color events as well |
| 804 | return false; |
| 805 | |
| 806 | } else if (name == cfg_default_font_size) { |
| 807 | |
| 808 | int df = 0; |
| 809 | tl::from_string (value, df); |
| 810 | if (m_default_font_size != df) { |
| 811 | // keep a shadow state to correctly issue the redraw call |
| 812 | m_default_font_size = df; |
| 813 | lay::FixedFont::set_default_font_size (df); |
| 814 | redraw_later (); |
| 815 | } |
| 816 | // do not take - let others have the event for the redraw call |
| 817 | return false; |
| 818 | |
| 819 | } else if (name == cfg_bitmap_oversampling) { |
| 820 | |
| 821 | int os = 1; |
| 822 | tl::from_string (value, os); |
| 823 | if (os != int (mp_canvas->oversampling ())) { |
| 824 | mp_canvas->set_oversampling (os); |
| 825 | resolution_changed_event (); |
| 826 | } |
| 827 | return true; |
| 828 | |
| 829 | } else if (name == cfg_highres_mode) { |
| 830 | |
| 831 | bool hrm = false; |
| 832 | tl::from_string (value, hrm); |
| 833 | if (hrm != mp_canvas->highres_mode ()) { |
| 834 | mp_canvas->set_highres_mode (hrm); |
| 835 | resolution_changed_event (); |
| 836 | } |
| 837 | return true; |
| 838 | |
| 839 | } else if (name == cfg_subres_mode) { |
| 840 |
nothing calls this directly
no test coverage detected