コード例 #1
0
 void updateLayout (const int width)
 {
     TextLayout text;
     text.appendText (getText(), getFont());
     text.layout (width - 8, Justification::topLeft, true);
     setSize (width, jmin (width, text.getHeight() + (int) getFont().getHeight()));
 }
コード例 #2
0
ファイル: jucer_PrefsPanel.cpp プロジェクト: EQ4/editor
    AboutPage()
    {
        logo = ImageCache::getFromMemory (BinaryData::jules_jpg, BinaryData::jules_jpgSize);

        text1.appendText ("Programmer Julian Storer, seen here demonstrating a beard designed to "
                          "gain approval from the Linux programming community. Each hair of the beard "
                          "represents one line of source code from the ", Font (13.0f));
        text1.appendText ("Jucer", Font (13.0f, Font::bold));
        text1.appendText (" component design tool.", Font (13.0f));

        text2.appendText ("Jucer v" + JUCEApplication::getInstance()->getApplicationVersion()
                            + ", " + SystemStats::getJUCEVersion(), Font (14.0f, Font::bold));

        addAndMakeVisible (link = new HyperlinkButton ("www.rawmaterialsoftware.com/juce",
                                                       URL ("http://www.rawmaterialsoftware.com/juce")));
        link->setFont (Font (10.0f, Font::bold | Font::underlined), true);
    }