~ubuntu-branches/ubuntu/raring/konversation/raring-proposed

« back to all changes in this revision

Viewing changes to src/viewer/statuspanel.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Thomas
  • Date: 2010-07-01 11:24:31 UTC
  • mfrom: (2.2.15 sid)
  • Revision ID: james.westby@ubuntu.com-20100701112431-7ch1bzggwdn9y7pr
Tags: 1.3.1-0ubuntu1
* New upstream bugfix release
* Merge from Debian Unstable, remaining changes:
  - Add kubuntu_01_default_channels.diff, disable debian_channel.diff
  - Keep message indicator patches, libindicator-dev build-dep

Show diffs side-by-side

added added

removed removed

Lines of Context:
151
151
 
152
152
void StatusPanel::updateAppearance()
153
153
{
154
 
    QColor fg, bg;
155
 
 
156
 
    if (Preferences::self()->inputFieldsBackgroundColor())
157
 
    {
158
 
        fg = Preferences::self()->color(Preferences::ChannelMessage);
159
 
        bg = Preferences::self()->color(Preferences::TextViewBackground);
160
 
    }
161
 
    else
162
 
    {
163
 
        fg = palette().windowText().color();
164
 
        bg = palette().base().color();
165
 
    }
166
 
 
167
 
    QPalette statusInputPalette(statusInput->palette());
168
 
    statusInputPalette.setColor(QPalette::WindowText, fg);
169
 
    statusInputPalette.setColor(QPalette::Text, fg);
170
 
    statusInputPalette.setColor(QPalette::Base, bg);
171
 
    statusInput->setPalette(statusInputPalette);
172
 
 
173
 
 
174
 
    if (Preferences::self()->customTextFont())
175
 
    {
176
 
        statusInput->setFont(Preferences::self()->textFont());
177
 
        nicknameCombobox->setFont(Preferences::self()->textFont());
178
 
    }
179
 
    else
180
 
    {
181
 
        statusInput->setFont(KGlobalSettings::generalFont());
182
 
        nicknameCombobox->setFont(KGlobalSettings::generalFont());
183
 
    }
184
 
 
185
 
    showNicknameBox(Preferences::self()->showNicknameBox());
 
154
    if (Preferences::self()->showNicknameBox())
 
155
    {
 
156
        if (Preferences::self()->customTextFont())
 
157
            nicknameCombobox->setFont(Preferences::self()->textFont());
 
158
        else
 
159
            nicknameCombobox->setFont(KGlobalSettings::generalFont());
 
160
 
 
161
        nicknameCombobox->show();
 
162
    }
 
163
    else
 
164
        nicknameCombobox->hide();
186
165
 
187
166
    ChatWindow::updateAppearance();
188
167
}
351
330
    nicknameCombobox->setEnabled(online);
352
331
}
353
332
 
354
 
void StatusPanel::showNicknameBox(bool show)
355
 
{
356
 
    if(show)
357
 
    {
358
 
        nicknameCombobox->show();
359
 
    }
360
 
    else
361
 
    {
362
 
        nicknameCombobox->hide();
363
 
    }
364
 
}
365
 
 
366
333
void StatusPanel::setServer(Server* server)
367
334
{
368
335
    ChatWindow::setServer(server);