mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-24 07:27:44 +01:00
[Summary] Making different fonts for WIN and MAC
This commit is contained in:
parent
4dab63411c
commit
aba2595572
15 changed files with 258 additions and 112 deletions
|
|
@ -1,6 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Dialog title=" " resizeable="False">
|
||||
<style name="generic_control" font ="Arial 10"/>
|
||||
<style name="generic_control"
|
||||
winfont ="Arial 10"
|
||||
macfont ="Helvetica 10"/>
|
||||
<style name="generic_button"
|
||||
style="generic_control"
|
||||
fgnormal="#BFBFBF"
|
||||
|
|
@ -17,7 +19,6 @@
|
|||
|
||||
<Label style ="generic_control"
|
||||
justify="center"
|
||||
font="10"
|
||||
text="Add Track"
|
||||
x="0"
|
||||
y="0"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<RouteUI bgnormal="#383838" bgactive="#6A6A6A">
|
||||
<RouteUI bgnormal="#383838" bgactive="#545454">
|
||||
<HBox>
|
||||
<VBox>
|
||||
<EventBox height="1" bgnormal="#494949" bgactive="#494949"/>
|
||||
|
|
@ -12,7 +12,12 @@
|
|||
<VBox box.pack="end">
|
||||
<!--<Igor! height="4" below is the shift from TOP side of the space>-->
|
||||
<HBox height="4"/>
|
||||
<Label id="number_label" text="32" fgnormal="#ffffff" fgactive="#ffffff" font ="Helvetica Bold 13"/>
|
||||
<Label id="number_label"
|
||||
text="32"
|
||||
fgnormal="#ffffff"
|
||||
fgactive="#ffffff"
|
||||
winfont ="Arial Bold 13"
|
||||
macfont ="Helvetica Bold 13"/>
|
||||
</VBox>
|
||||
</HBox>
|
||||
</EventBox>
|
||||
|
|
@ -29,14 +34,16 @@
|
|||
id="name_label_home">
|
||||
<HBox width="5"/>
|
||||
<Label id="name_label"
|
||||
font="Helvetica 10"
|
||||
winfont ="Arial 10"
|
||||
macfont ="Helvetica 10"
|
||||
fgnormal="#ffffff"
|
||||
fgactive="#ffffff"/>
|
||||
<FocusEntry id="name_entry"
|
||||
width="80"
|
||||
height="20"
|
||||
fgnormal="#ffffff"
|
||||
font ="Helvetica 10"
|
||||
winfont ="Arial 10"
|
||||
macfont ="Helvetica 10"
|
||||
cssname="EditorTrackNameDisplay"
|
||||
textcolornormal="#ffffff"
|
||||
textcoloractive="#ffffff"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Layout bgnormal="#565656" width="274" height="20">
|
||||
<style name="generic_control" font ="Arial 10"/>
|
||||
<style name="generic_control"
|
||||
winfont ="Arial 10"
|
||||
macfont ="Helvetica 10"/>
|
||||
<Layout bgnormal="#862579" x="0" y="0" width="3" height="20"/>
|
||||
<Layout bgnormal="#797979" x="6" y="0" width="85" height="19">
|
||||
<Label style="generic_control"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Layout bgnormal="#565656" width="184" height="20">
|
||||
<style name="generic_control" font ="Arial 10"/>
|
||||
<style name="generic_control"
|
||||
winfont ="Arial 10"
|
||||
macfont ="Helvetica 10"/>
|
||||
<Layout bgnormal="#27ae36" x="0" y="0" width="3" height="20"/>
|
||||
<Layout bgnormal="#797979" x="6" y="0" width="85" height="19">
|
||||
<Label style="generic_control"
|
||||
|
|
|
|||
|
|
@ -137,14 +137,16 @@
|
|||
<HBox width="7"/>
|
||||
<Label id="input_info_label"
|
||||
text="IN Grisha, Kolya"
|
||||
font="Arial Bold 7"/>
|
||||
winfont="Arial Bold 7"
|
||||
macfont="Helvetica Bold 7"/>
|
||||
<HBox box.fill="true" box.expand="true"/>
|
||||
</HBox>
|
||||
<HBox>
|
||||
<HBox width="7"/>
|
||||
<Label id="output_info_label"
|
||||
text="OUT please code it"
|
||||
font="Arial Bold 7"/>
|
||||
winfont="Arial Bold 7"
|
||||
macfont="Helvetica Bold 7"/>
|
||||
<HBox box.fill="true" box.expand="true"/>
|
||||
</HBox>
|
||||
<HBox height="5"/>
|
||||
|
|
@ -204,7 +206,9 @@
|
|||
height="47"
|
||||
fgnormal="#D7D7D7"
|
||||
fghover="#D7D7D7"
|
||||
fgactive="#D7D7D7"/>
|
||||
fgactive="#D7D7D7"
|
||||
winfont ="Arial 10"
|
||||
macfont ="Helvetica 10"/>
|
||||
</VBox>
|
||||
</EventBox>
|
||||
<HBox visible="false" noshowall="true">
|
||||
|
|
|
|||
|
|
@ -19,7 +19,8 @@
|
|||
<HBox>
|
||||
<VBox width="6"/>
|
||||
<Label text="MASTER"
|
||||
font="Helvetica 10"
|
||||
winfont ="Arial 10"
|
||||
macfont ="Helvetica 10"
|
||||
fgnormal="#ffffff"
|
||||
fgactive="#ffffff"
|
||||
justify="left"/>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Layout bgnormal="#565656" width="421" height="20">
|
||||
<style name="generic_control" font ="Arial 10"/>
|
||||
<style name="generic_control"
|
||||
winfont ="Arial 10"
|
||||
macfont ="Helvetica 10"/>
|
||||
<Layout bgnormal="#797979" x="0" y="0" width="291" height="19">
|
||||
<Label style="generic_control"
|
||||
id="midi_device_name_label"
|
||||
|
|
|
|||
|
|
@ -57,7 +57,9 @@
|
|||
height="1"/>
|
||||
<Button id="name_button"
|
||||
width="57"
|
||||
height="28"/>
|
||||
height="28"
|
||||
winfont ="Arial 10"
|
||||
macfont ="Helvetica 10"/>
|
||||
<EventBox bgnormal="#000000"
|
||||
bgactive="#000000"
|
||||
height="1"/>
|
||||
|
|
|
|||
|
|
@ -1,33 +1,43 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Dialog title=" " resizeable="False">
|
||||
<style name="generic_control" font ="Arial 10"/>
|
||||
<style name="generic_control"
|
||||
winfont ="Arial 10"
|
||||
macfont ="Helvetica 10"/>
|
||||
<style name="generic_button"
|
||||
style="generic_control"
|
||||
fgnormal="#BFBFBF"
|
||||
bgnormal="#6C6C6C"
|
||||
fgactive="#BFBFBF"
|
||||
bgactive="#454545"
|
||||
fghover="#CCCCCC"
|
||||
bghover="#898989"
|
||||
fgdisabled ="#959595"
|
||||
bordercolor="#7E7E7E"
|
||||
borderwidth="0 0 0 0" />
|
||||
style="generic_control"
|
||||
fgnormal="#BFBFBF"
|
||||
bgnormal="#6C6C6C"
|
||||
fgactive="#BFBFBF"
|
||||
bgactive="#454545"
|
||||
fghover="#CCCCCC"
|
||||
bghover="#898989"
|
||||
fgdisabled ="#959595"
|
||||
bordercolor="#7E7E7E"
|
||||
borderwidth="0 0 0 0" />
|
||||
|
||||
<Layout width="400" height="170">
|
||||
|
||||
<Label style ="generic_control"
|
||||
id="top_label"
|
||||
justify="center"
|
||||
font="14"
|
||||
text="??\n??\n??\n??\n??"
|
||||
x="20" y="40" width="360" height="30"/>
|
||||
id="top_label"
|
||||
justify="center"
|
||||
winfont ="Arial 14"
|
||||
macfont ="Helvetica 14"
|
||||
text="??\n??\n??\n??\n??"
|
||||
x="20"
|
||||
y="40"
|
||||
width="360"
|
||||
height="30"/>
|
||||
|
||||
<Label style ="generic_control"
|
||||
id="bottom_label"
|
||||
justify="center"
|
||||
text="??\n??\n??\n??\n??"
|
||||
font="12"
|
||||
x="20" y="80" width="360" height="30"/>
|
||||
id="bottom_label"
|
||||
justify="center"
|
||||
text="??\n??\n??\n??\n??"
|
||||
winfont ="Arial 12"
|
||||
macfont ="Helvetica 12"
|
||||
x="20"
|
||||
y="80"
|
||||
width="360"
|
||||
height="30"/>
|
||||
|
||||
<Button style="generic_button"
|
||||
id="cancel_button"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Dialog title="Session" resizeable="false">
|
||||
<style name="generic_control" font ="Arial 10"/>
|
||||
<style name="generic_control"
|
||||
winfont ="Arial 10"
|
||||
macfont ="Helvetica 10"/>
|
||||
<style name="generic_button"
|
||||
style="generic_control"
|
||||
fgnormal="#BFBFBF"
|
||||
|
|
@ -23,67 +25,129 @@
|
|||
<Button style="generic_button"
|
||||
id="new_session_button"
|
||||
text="NEW SESSION"
|
||||
x="11" y="10" width="296" height="26"/>
|
||||
x="11"
|
||||
y="10"
|
||||
width="296"
|
||||
height="26"/>
|
||||
<Button style="generic_button"
|
||||
id="open_selected_button"
|
||||
text="OPEN SELECTED"
|
||||
x="11" y="38" width="296" height="26"/>
|
||||
x="11"
|
||||
y="38"
|
||||
width="296"
|
||||
height="26"/>
|
||||
<Button style="generic_button"
|
||||
id="open_saved_session_button"
|
||||
text="OPEN SAVED SESSION"
|
||||
x="11" y="66" width="296" height="26"/>
|
||||
x="11"
|
||||
y="66"
|
||||
width="296"
|
||||
height="26"/>
|
||||
<Button style="generic_button"
|
||||
id="system_configuration_button"
|
||||
text="SYSTEM CONFIGURATION"
|
||||
x="11" y="94" width="296" height="26"/>
|
||||
x="11"
|
||||
y="94"
|
||||
width="296"
|
||||
height="26"/>
|
||||
<Button style="generic_button"
|
||||
id="quit_button"
|
||||
text="QUIT"
|
||||
x="11" y="214" width="296" height="26"/>
|
||||
<Layout bgnormal="#404040" x="12" y="131" width="296" height="75">
|
||||
x="11"
|
||||
y="214"
|
||||
width="296"
|
||||
height="26"/>
|
||||
<Layout bgnormal="#404040"
|
||||
x="12"
|
||||
y="131"
|
||||
width="296"
|
||||
height="75">
|
||||
<Label style ="generic_control"
|
||||
text="Audio Interface:\nChannel Configuration:\nOperation Mode:\nSample Rate:"
|
||||
x="0" y="0"/>
|
||||
x="0"
|
||||
y="0"/>
|
||||
<Label style ="generic_control"
|
||||
id="session_details_label"
|
||||
text="??\n??\n??\n??\n??"
|
||||
x="114"
|
||||
y="0"/>
|
||||
</Layout>
|
||||
<Layout bgnormal="#646464" x="317" y="10" width="121" height="229">
|
||||
<Layout bgnormal="#383838" x="1" y="1" width="119" height="227">
|
||||
<Layout bgnormal="#646464"
|
||||
x="317"
|
||||
y="10"
|
||||
width="121"
|
||||
height="229">
|
||||
<Layout bgnormal="#383838"
|
||||
x="1"
|
||||
y="1"
|
||||
width="119"
|
||||
height="227">
|
||||
<Label style="generic_control"
|
||||
text="RECENT" x="37" y="6" font ="Arial 9"/>
|
||||
text="RECENT"
|
||||
x="37"
|
||||
y="6"
|
||||
winfont ="Arial 9"
|
||||
macfont ="Helvetica 9"/>
|
||||
<Button style="recent_session_button"
|
||||
id="recent_session_button_0"
|
||||
x="4" y="24" width="111" height="19"/>
|
||||
x="4"
|
||||
y="24"
|
||||
width="111"
|
||||
height="19"/>
|
||||
<Button style="recent_session_button"
|
||||
id="recent_session_button_1"
|
||||
x="4" y="44" width="111" height="19"/>
|
||||
x="4"
|
||||
y="44"
|
||||
width="111"
|
||||
height="19"/>
|
||||
<Button style="recent_session_button"
|
||||
id="recent_session_button_2"
|
||||
x="4" y="64" width="111" height="19"/>
|
||||
x="4"
|
||||
y="64"
|
||||
width="111"
|
||||
height="19"/>
|
||||
<Button style="recent_session_button"
|
||||
id="recent_session_button_3"
|
||||
x="4" y="84" width="111" height="19"/>
|
||||
x="4"
|
||||
y="84"
|
||||
width="111"
|
||||
height="19"/>
|
||||
<Button style="recent_session_button"
|
||||
id="recent_session_button_4"
|
||||
x="4" y="104" width="111" height="19"/>
|
||||
x="4"
|
||||
y="104"
|
||||
width="111"
|
||||
height="19"/>
|
||||
<Button style="recent_session_button"
|
||||
id="recent_session_button_5"
|
||||
x="4" y="124" width="111" height="19"/>
|
||||
x="4"
|
||||
y="124"
|
||||
width="111"
|
||||
height="19"/>
|
||||
<Button style="recent_session_button"
|
||||
id="recent_session_button_6"
|
||||
x="4" y="144" width="111" height="19"/>
|
||||
x="4"
|
||||
y="144"
|
||||
width="111"
|
||||
height="19"/>
|
||||
<Button style="recent_session_button"
|
||||
id="recent_session_button_7"
|
||||
x="4" y="164" width="111" height="19"/>
|
||||
x="4"
|
||||
y="164"
|
||||
width="111"
|
||||
height="19"/>
|
||||
<Button style="recent_session_button"
|
||||
id="recent_session_button_8"
|
||||
x="4" y="184" width="111" height="19"/>
|
||||
x="4"
|
||||
y="184"
|
||||
width="111"
|
||||
height="19"/>
|
||||
<Button style="recent_session_button"
|
||||
id="recent_session_button_9"
|
||||
x="4" y="204" width="111" height="19"/>
|
||||
x="4"
|
||||
y="204"
|
||||
width="111"
|
||||
height="19"/>
|
||||
</Layout>
|
||||
</Layout>
|
||||
</Layout>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Dialog title=" " resizeable="False">
|
||||
<style name="generic_control" font ="Arial Bold 16"/>
|
||||
<style name="generic_control"
|
||||
winfont ="Arial Bold 16"
|
||||
macfont ="Helvetica Bold 16"/>
|
||||
<style name="generic_button"
|
||||
style="generic_control"
|
||||
fgnormal="#FFffff"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Dialog title="Tracks Preferences" resizeable="false">
|
||||
<style name="generic_control" font ="Arial 10"/>
|
||||
<style name="generic_control"
|
||||
winfont ="Arial 10"
|
||||
macfont ="Helvetica 10"/>
|
||||
<style name="generic_button"
|
||||
style="generic_control"
|
||||
fgnormal="#BFBFBF"
|
||||
|
|
@ -24,7 +26,8 @@
|
|||
bgnormal="#1F1F1F"
|
||||
bgactive="#565656"
|
||||
bghover="#2f2f2f"
|
||||
font ="Arial Bold 10"
|
||||
winfont ="Arial Bold 10"
|
||||
macfont ="Helvetica Bold 10"
|
||||
width="107" height="65"/>
|
||||
<Layout bgnormal="#A0A0A0" width="107" height="1"/>
|
||||
<Button
|
||||
|
|
@ -35,7 +38,8 @@
|
|||
bgnormal="#1F1F1F"
|
||||
bgactive="#565656"
|
||||
bghover="#2f2f2f"
|
||||
font ="Arial Bold 10"
|
||||
winfont ="Arial Bold 10"
|
||||
macfont ="Helvetica Bold 10"
|
||||
width="107" height="65"/>
|
||||
<Layout bgnormal="#A0A0A0" width="107" height="1"/>
|
||||
<Button
|
||||
|
|
@ -46,7 +50,8 @@
|
|||
bgnormal="#1F1F1F"
|
||||
bgactive="#565656"
|
||||
bghover="#2f2f2f"
|
||||
font ="Arial Bold 10"
|
||||
winfont ="Arial Bold 10"
|
||||
macfont ="Helvetica Bold 10"
|
||||
width="107" height="65"/>
|
||||
<Layout bgnormal="#A0A0A0" width="107" height="1"/>
|
||||
</VBox>
|
||||
|
|
@ -70,13 +75,38 @@
|
|||
</Layout>
|
||||
<Layout id="midi_settings_layout" bgnormal="#565656" x="113" y="1" width="505" height="557" visible="true">
|
||||
<Layout bgnormal="#000000" x="21" y="20" width="291" height="19">
|
||||
<Label style="generic_control" text="MIDI PORTS" fgnormal="#ffffff" font ="Arial Bold 10" x="7" y="3"/>
|
||||
<Label style="generic_control"
|
||||
text="MIDI PORTS"
|
||||
fgnormal="#ffffff"
|
||||
winfont ="Arial Bold 10"
|
||||
macfont ="Helvetica Bold 10"
|
||||
x="7" y="3"/>
|
||||
</Layout>
|
||||
<Layout bgnormal="#797979" x="317" y="20" width="60" height="19">
|
||||
<Label style="generic_control" text="INPUT" fgnormal="#ffffff" font="Arial Bold 10" x="7" y="3"/>
|
||||
<Layout bgnormal="#797979"
|
||||
x="317"
|
||||
y="20"
|
||||
width="60"
|
||||
height="19">
|
||||
<Label style="generic_control"
|
||||
text="INPUT"
|
||||
fgnormal="#ffffff"
|
||||
winfont ="Arial Bold 10"
|
||||
macfont ="Helvetica Bold 10"
|
||||
x="7"
|
||||
y="3"/>
|
||||
</Layout>
|
||||
<Layout bgnormal="#797979" x="382" y="20" width="60" height="19">
|
||||
<Label style="generic_control" text="OUTPUT" fgnormal="#ffffff" font="Arial Bold 10" x="7" y="3"/>
|
||||
<Layout bgnormal="#797979"
|
||||
x="382"
|
||||
y="20"
|
||||
width="60"
|
||||
height="19">
|
||||
<Label style="generic_control"
|
||||
text="OUTPUT"
|
||||
fgnormal="#ffffff"
|
||||
winfont ="Arial Bold 10"
|
||||
macfont ="Helvetica Bold 10"
|
||||
x="7"
|
||||
y="3"/>
|
||||
</Layout>
|
||||
<Layout bgnormal="#000000" x="447" y="20" width="14" height="19" />
|
||||
<ScrolledWindow x="21" y="62" bgnormal="#565656" width="440" height="218" hscroll="never" vscroll="auto">
|
||||
|
|
@ -108,30 +138,41 @@
|
|||
<Label id="latency_label" style="generic_control" text="INPUT LATENCY:" x="16" y="74 " width="476"/>
|
||||
</Layout>
|
||||
<Layout bgnormal="#565656" x="0" y="101" width="505" height="39">
|
||||
<Label style="generic_control" text="CHANNEL CONFIGURATION MODE" fgnormal="#ffffff" font="Arial Bold 10" x="17" y="15"/>
|
||||
<Label style="generic_control" text="CHANNEL CONFIGURATION MODE" fgnormal="#ffffff"
|
||||
winfont ="Arial Bold 10"
|
||||
macfont ="Helvetica Bold 10"
|
||||
x="17" y="15"/>
|
||||
<Button id="multi_out_button"
|
||||
style="generic_button"
|
||||
text="MULTI OUT"
|
||||
fgnormal="#C2C2C2"
|
||||
fgactive="#FFFFFF"
|
||||
bgactive="#1CA3B3"
|
||||
fghover="#CECECE"
|
||||
font="Arial Bold 10"
|
||||
x="280" y="6" width="106" height="28"/>
|
||||
style="generic_button"
|
||||
text="MULTI OUT"
|
||||
fgnormal="#C2C2C2"
|
||||
fgactive="#FFFFFF"
|
||||
bgactive="#1CA3B3"
|
||||
fghover="#CECECE"
|
||||
winfont ="Arial Bold 10"
|
||||
macfont ="Helvetica Bold 10"
|
||||
x="280" y="6" width="106" height="28"/>
|
||||
<Button id="stereo_out_button"
|
||||
text="STEREO OUT"
|
||||
style="generic_button"
|
||||
fgnormal="#C2C2C2"
|
||||
fgactive="#FFFFFF"
|
||||
bgactive="#1CA3B3"
|
||||
fghover="#CECECE"
|
||||
font="Arial Bold 10"
|
||||
text="STEREO OUT"
|
||||
style="generic_button"
|
||||
fgnormal="#C2C2C2"
|
||||
fgactive="#FFFFFF"
|
||||
bgactive="#1CA3B3"
|
||||
fghover="#CECECE"
|
||||
winfont ="Arial Bold 10"
|
||||
macfont ="Helvetica Bold 10"
|
||||
x="387" y="6" width="106" height="28"/>
|
||||
</Layout>
|
||||
<Layout bgnormal="#565656" x="0" y="141" width="505" height="416">
|
||||
<Layout bgnormal="#862579" x="16" y="13" width="3" height="41"/>
|
||||
<Layout bgnormal="#862579" x="22" y="13" width="265" height="19">
|
||||
<Label style="generic_control" text="INPUTS" fgnormal="#ffffff" font ="Arial Bold 10" x="7" y="3"/>
|
||||
<Label style="generic_control"
|
||||
text="INPUTS"
|
||||
fgnormal="#ffffff"
|
||||
winfont ="Arial Bold 10"
|
||||
macfont ="Helvetica Bold 10"
|
||||
x="7"
|
||||
y="3"/>
|
||||
</Layout>
|
||||
<Layout bgnormal="#797979" x="22" y="35" width="85" height="19">
|
||||
<Label style="generic_control" text="Port" fgnormal="#000000" x="7" y="3"/>
|
||||
|
|
@ -166,7 +207,13 @@
|
|||
</Layout>
|
||||
<Layout bgnormal="#27ae36" x="290" y="13" width="3" height="41"/>
|
||||
<Layout bgnormal="#27ae36" x="296" y="13" width="178" height="19">
|
||||
<Label style="generic_control" text="OUTPUTS" fgnormal="#ffffff" font ="Arial Bold 10" x="7" y="3"/>
|
||||
<Label style="generic_control"
|
||||
text="OUTPUTS"
|
||||
fgnormal="#ffffff"
|
||||
winfont ="Arial Bold 10"
|
||||
macfont ="Helvetica Bold 10"
|
||||
x="7"
|
||||
y="3"/>
|
||||
</Layout>
|
||||
<Layout bgnormal="#797979" x="296" y="35" width="85" height="19">
|
||||
<Label style="generic_control" text="Port" fgnormal="#000000" x="7" y="3"/>
|
||||
|
|
|
|||
|
|
@ -39,8 +39,20 @@ using std::max;
|
|||
using std::min;
|
||||
using namespace std;
|
||||
|
||||
void
|
||||
WavesButton::__prop_style_watcher(WavesButton *that)
|
||||
{
|
||||
that->_prop_style_watcher();
|
||||
}
|
||||
|
||||
void
|
||||
WavesButton::_prop_style_watcher()
|
||||
{
|
||||
_layout->set_font_description(get_style()->get_font());
|
||||
}
|
||||
|
||||
WavesButton::WavesButton ()
|
||||
: _text_width (0)
|
||||
: _text_width (0)
|
||||
, _text_height (0)
|
||||
, _corner_radius (0.0)
|
||||
, _corner_mask (0xf)
|
||||
|
|
@ -52,7 +64,9 @@ WavesButton::WavesButton ()
|
|||
, _top_border_width (0)
|
||||
, _right_border_width (0)
|
||||
, _bottom_border_width (0)
|
||||
, _layout (Pango::Layout::create (get_pango_context()))
|
||||
{
|
||||
property_style ().signal_changed ().connect (bind (sigc::ptr_fun (__prop_style_watcher), this));
|
||||
ColorsChanged.connect (sigc::mem_fun (*this, &WavesButton::color_handler));
|
||||
}
|
||||
|
||||
|
|
@ -69,7 +83,9 @@ WavesButton::WavesButton (const std::string& str)
|
|||
, _top_border_width (0)
|
||||
, _right_border_width (0)
|
||||
, _bottom_border_width (0)
|
||||
, _layout (Pango::Layout::create (get_pango_context()))
|
||||
{
|
||||
property_style ().signal_changed ().connect (bind (sigc::ptr_fun (__prop_style_watcher), this));
|
||||
set_text (str);
|
||||
}
|
||||
|
||||
|
|
@ -81,28 +97,7 @@ void
|
|||
WavesButton::set_text (const std::string& str)
|
||||
{
|
||||
_text = str;
|
||||
|
||||
if (!_layout && !_text.empty()) {
|
||||
_layout = Pango::Layout::create (get_pango_context());
|
||||
}
|
||||
|
||||
if (_layout) {
|
||||
_layout->set_text (str);
|
||||
}
|
||||
|
||||
queue_resize ();
|
||||
}
|
||||
|
||||
void
|
||||
WavesButton::set_markup (const std::string& str)
|
||||
{
|
||||
_text = str;
|
||||
|
||||
if (!_layout) {
|
||||
_layout = Pango::Layout::create (get_pango_context());
|
||||
}
|
||||
|
||||
_layout->set_markup (str);
|
||||
_layout->set_text (str);
|
||||
queue_resize ();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,6 @@ class WavesButton : public CairoWidget , public Gtkmm2ext::Activatable
|
|||
void set_rounded_corner_mask (int);
|
||||
|
||||
void set_text (const std::string&);
|
||||
void set_markup (const std::string&);
|
||||
void set_angle (const double);
|
||||
void set_border_width(float, float, float, float);
|
||||
void set_border_width(const char*);
|
||||
|
|
@ -97,6 +96,9 @@ class WavesButton : public CairoWidget , public Gtkmm2ext::Activatable
|
|||
void action_tooltip_changed ();
|
||||
|
||||
private:
|
||||
static void __prop_style_watcher(WavesButton *);
|
||||
void _prop_style_watcher();
|
||||
|
||||
Glib::RefPtr<Pango::Layout> _layout;
|
||||
std::string _text;
|
||||
BindingProxy binding_proxy;
|
||||
|
|
|
|||
|
|
@ -192,13 +192,14 @@ WavesUI::create_widget (const XMLNode& definition, const XMLNodeMap& styles)
|
|||
double max_value = xml_property (definition, "maxvalue", styles, 100.0);
|
||||
double initial_value = xml_property (definition, "initialvalue", styles, min_value);
|
||||
double step = xml_property (definition, "step", styles, (max_value-min_value)/100.0);
|
||||
double page_increment = xml_property (definition, "pageincrement", styles, (max_value-min_value)/10);
|
||||
|
||||
double page_increment = xml_property (definition, "pageincrement", styles, (max_value-min_value)/20);
|
||||
double page_size = xml_property (definition, "pagesize", styles, (max_value-min_value)/10);
|
||||
child = manage (new Gtk::Adjustment (initial_value,
|
||||
min_value,
|
||||
max_value,
|
||||
step,
|
||||
page_increment));
|
||||
page_increment,
|
||||
page_size));
|
||||
} else if (widget_type != "STYLE") {
|
||||
dbg_msg (std::string("Illegal object type (" +
|
||||
definition.name() +
|
||||
|
|
@ -568,7 +569,11 @@ WavesUI::set_attributes (Gtk::Widget& widget, const XMLNode& definition, const X
|
|||
widget.modify_fg(Gtk::STATE_PRELIGHT, Gdk::Color(property));
|
||||
}
|
||||
|
||||
property = xml_property (definition, "font", styles, "");
|
||||
#if defined (PLATFORM_WINDOWS)
|
||||
property = xml_property (definition, "winfont", styles, "");
|
||||
#elif defined (__MACOS__)
|
||||
property = xml_property (definition, "macfont", styles, "");
|
||||
#endif
|
||||
if (!property.empty ()) {
|
||||
widget.modify_font(Pango::FontDescription(property));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue